From 94f15f0fea18640c312a0f746ce693c1c260efe0 Mon Sep 17 00:00:00 2001 From: Pieter Vanderwerff Date: Sun, 27 Jul 2014 12:55:14 +1200 Subject: [PATCH] Minor flux-chat example code cleanup --- examples/flux-chat/js/constants/ChatConstants.js | 2 -- examples/flux-chat/js/stores/MessageStore.js | 2 +- examples/flux-chat/js/stores/ThreadStore.js | 3 +-- examples/flux-chat/js/stores/UnreadThreadStore.js | 2 +- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/examples/flux-chat/js/constants/ChatConstants.js b/examples/flux-chat/js/constants/ChatConstants.js index 8cfe902e21a27e..47b8f0404942d8 100644 --- a/examples/flux-chat/js/constants/ChatConstants.js +++ b/examples/flux-chat/js/constants/ChatConstants.js @@ -12,8 +12,6 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * - * A singleton that operates as the central hub for application updates. */ var keyMirror = require('react/lib/keyMirror'); diff --git a/examples/flux-chat/js/stores/MessageStore.js b/examples/flux-chat/js/stores/MessageStore.js index d291c72db2fcfc..38dfc7dc0962fe 100644 --- a/examples/flux-chat/js/stores/MessageStore.js +++ b/examples/flux-chat/js/stores/MessageStore.js @@ -42,7 +42,7 @@ function _markAllInThreadRead(threadID) { if (_messages[id].threadID === threadID) { _messages[id].isRead = true; } - }; + } } var MessageStore = merge(EventEmitter.prototype, { diff --git a/examples/flux-chat/js/stores/ThreadStore.js b/examples/flux-chat/js/stores/ThreadStore.js index f2ee2bb0c70e72..aed1faed27e8d0 100644 --- a/examples/flux-chat/js/stores/ThreadStore.js +++ b/examples/flux-chat/js/stores/ThreadStore.js @@ -18,7 +18,6 @@ var ChatAppDispatcher = require('../dispatcher/ChatAppDispatcher'); var ChatConstants = require('../constants/ChatConstants'); var ChatMessageUtils = require('../utils/ChatMessageUtils'); var EventEmitter = require('events').EventEmitter; -var MessageStore = require('../stores/MessageStore'); var merge = require('react/lib/merge'); var ActionTypes = ChatConstants.ActionTypes; @@ -83,7 +82,7 @@ var ThreadStore = merge(EventEmitter.prototype, { getAllChrono: function() { var orderedThreads = []; for (var id in _threads) { - thread = _threads[id]; + var thread = _threads[id]; orderedThreads.push(thread); } orderedThreads.sort(function(a, b) { diff --git a/examples/flux-chat/js/stores/UnreadThreadStore.js b/examples/flux-chat/js/stores/UnreadThreadStore.js index a9ec40f08d356f..6be3582dacb6b7 100644 --- a/examples/flux-chat/js/stores/UnreadThreadStore.js +++ b/examples/flux-chat/js/stores/UnreadThreadStore.js @@ -53,7 +53,7 @@ var UnreadThreadStore = merge(EventEmitter.prototype, { } } return unreadCount; - }, + } });