User prefs exist check

This commit is contained in:
Mo Bitar
2018-06-27 10:40:52 -05:00
parent 498049adcb
commit 99c6d35ee7

View File

@@ -308,9 +308,11 @@ angular.module('app')
} }
this.syncUserPreferences = function() { this.syncUserPreferences = function() {
if(this.userPreferences) {
this.userPreferences.setDirty(true); this.userPreferences.setDirty(true);
$rootScope.sync("syncUserPreferences"); $rootScope.sync("syncUserPreferences");
} }
}
this.getUserPrefValue = function(key, defaultValue) { this.getUserPrefValue = function(key, defaultValue) {
if(!this.userPreferences) { return defaultValue; } if(!this.userPreferences) { return defaultValue; }