summaryrefslogtreecommitdiffstats
path: root/web/react/stores/preference_store.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/stores/preference_store.jsx')
-rw-r--r--web/react/stores/preference_store.jsx9
1 files changed, 4 insertions, 5 deletions
diff --git a/web/react/stores/preference_store.jsx b/web/react/stores/preference_store.jsx
index c13c61e1d..d731e7d27 100644
--- a/web/react/stores/preference_store.jsx
+++ b/web/react/stores/preference_store.jsx
@@ -75,13 +75,13 @@ class PreferenceStoreClass extends EventEmitter {
}
setPreference(category, name, value) {
- this.setPreferenceWithAltId(category, name, '', value);
+ return this.setPreferenceWithAltId(category, name, '', value);
}
setPreferenceWithAltId(category, name, altId, value) {
const preferences = this.getAllPreferences();
- const key = this.getKey(category, name);
+ const key = this.getKey(category, name, altId);
let preference = preferences.get(key);
if (!preference) {
@@ -97,6 +97,8 @@ class PreferenceStoreClass extends EventEmitter {
preferences.set(key, preference);
this.setAllPreferences(preferences);
+
+ return preference;
}
emitChange(preferences) {
@@ -130,6 +132,3 @@ class PreferenceStoreClass extends EventEmitter {
const PreferenceStore = new PreferenceStoreClass();
export default PreferenceStore;
-
-// TODO remove me
-global.PreferenceStore = PreferenceStore;