From 2a1cdc68c8639ae21b00f29fa372359489cfedcc Mon Sep 17 00:00:00 2001
From: Reed Garmsen <rgarmsen2295@gmail.com>
Date: Fri, 10 Jul 2015 11:48:52 -0700
Subject: Better logic for checking if channel has loaded

---
 web/react/stores/channel_store.jsx | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'web/react/stores/channel_store.jsx')

diff --git a/web/react/stores/channel_store.jsx b/web/react/stores/channel_store.jsx
index f6b8fecd4..4429a5312 100644
--- a/web/react/stores/channel_store.jsx
+++ b/web/react/stores/channel_store.jsx
@@ -202,13 +202,18 @@ var ChannelStore = assign({}, EventEmitter.prototype, {
     BrowserStore.setItem("more_channels", JSON.stringify(channels));
   },
   _getMoreChannels: function() {
-    var channels;
+    var channels = null;
     try {
         channels = JSON.parse(BrowserStore.getItem("more_channels"));
     }
     catch (err) {
 	}
 
+    if (channels == null) {
+        channels = {};
+        channels.loading = true;
+    }
+
     return channels;
   },
   _storeExtraInfos: function(extraInfos) {
-- 
cgit v1.2.3-1-g7c22

