Fixes a bug where scope.settings and globals.settings were out of sync.
Was caused by loadSettings() which assigned settings directly to globals.settings, thus breaking the reference.
This commit is contained in:
parent
fb65ae48bf
commit
025be32fc7
1 changed files with 6 additions and 1 deletions
|
@ -37,7 +37,12 @@ angular.module('JamStash')
|
|||
}
|
||||
var settings = persistence.getSettings();
|
||||
if (settings !== undefined) {
|
||||
globals.settings = _(settings).omit('Url');
|
||||
var updSettings = _(settings).omit('Url');
|
||||
// We can't just assign settings to globals.settings because it's on the scope
|
||||
// TODO: Hyz: remove $rootScope.settings and replace with individual settings
|
||||
_(updSettings).each(function(val, key) {
|
||||
globals.settings[key] = val;
|
||||
});
|
||||
}
|
||||
if (utils.getValue("SavedCollections")) { globals.SavedCollections = utils.getValue("SavedCollections").split(","); }
|
||||
if (utils.getValue("DefaultCollection")) { globals.DefaultCollection = utils.getValue("DefaultCollection"); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue