Skip to content
Snippets Groups Projects
Commit b1eab7ee authored by felmer's avatar felmer
Browse files

SSDM-8241: bug fixed: Couldn't remove space from inventory spaces (removal was...

SSDM-8241: bug fixed: Couldn't remove space from inventory spaces (removal was only visible after reload)
parent 4022ea86
No related branches found
No related tags found
No related merge requests found
...@@ -103,17 +103,15 @@ function SettingsManager(serverFacade) { ...@@ -103,17 +103,15 @@ function SettingsManager(serverFacade) {
} }
} }
// array fields to add values to defaults // array fields to add/remove values to defaults
var fieldsToAdd = [ var fieldsToAdd = [
"inventorySpaces" "inventorySpaces"
]; ];
for (var field of fieldsToAdd) { for (var field of fieldsToAdd) {
targetProfile[field] = [];
if (settings[field]) { if (settings[field]) {
for(var fIdx = 0; fIdx < settings[field].length; fIdx++) { for(var fIdx = 0; fIdx < settings[field].length; fIdx++) {
var settingsValue = settings[field][fIdx]; targetProfile[field].push(settings[field][fIdx]);
if(($.inArray(settingsValue, targetProfile[field]) === -1)) {
targetProfile[field].push(settingsValue);
}
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment