summaryrefslogtreecommitdiffstats
path: root/web/react/stores/preference_store.jsx
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2015-11-20 09:22:16 -0500
committerHarrison Healey <harrisonmhealey@gmail.com>2015-11-20 09:22:16 -0500
commit25bc02c785167370b0e2e04ee04f305a801078c4 (patch)
tree00a8e7c9821fc8d8669fd7a908b3f70e3089c95a /web/react/stores/preference_store.jsx
parent3aea449b524f7bbc9bae92309fb702e04c1bf01e (diff)
parent34097faa13dab6ea5d7ac992842126c17ad4d2b9 (diff)
downloadchat-25bc02c785167370b0e2e04ee04f305a801078c4.tar.gz
chat-25bc02c785167370b0e2e04ee04f305a801078c4.tar.bz2
chat-25bc02c785167370b0e2e04ee04f305a801078c4.zip
Merge pull request #1478 from mattermost/plt-1237
PLT-1237 Upgrading dependancies
Diffstat (limited to 'web/react/stores/preference_store.jsx')
-rw-r--r--web/react/stores/preference_store.jsx15
1 files changed, 9 insertions, 6 deletions
diff --git a/web/react/stores/preference_store.jsx b/web/react/stores/preference_store.jsx
index f630d150d..068bc29c2 100644
--- a/web/react/stores/preference_store.jsx
+++ b/web/react/stores/preference_store.jsx
@@ -1,11 +1,12 @@
// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved.
// See License.txt for license information.
-const ActionTypes = require('../utils/constants.jsx').ActionTypes;
-const AppDispatcher = require('../dispatcher/app_dispatcher.jsx');
-const BrowserStore = require('./browser_store.jsx');
-const EventEmitter = require('events').EventEmitter;
-const UserStore = require('../stores/user_store.jsx');
+import Constants from '../utils/constants.jsx';
+const ActionTypes = Constants.ActionTypes;
+import AppDispatcher from '../dispatcher/app_dispatcher.jsx';
+import BrowserStore from './browser_store.jsx';
+import EventEmitter from 'events';
+import UserStore from '../stores/user_store.jsx';
const CHANGE_EVENT = 'change';
@@ -105,7 +106,7 @@ class PreferenceStoreClass extends EventEmitter {
const action = payload.action;
switch (action.type) {
- case ActionTypes.RECIEVED_PREFERENCES:
+ case ActionTypes.RECIEVED_PREFERENCES: {
const preferences = this.getAllPreferences();
for (const preference of action.preferences) {
@@ -114,6 +115,8 @@ class PreferenceStoreClass extends EventEmitter {
this.setAllPreferences(preferences);
this.emitChange(preferences);
+ break;
+ }
}
}
}