remove joining channel loader / query window fix
authorDarren <darren@darrenwhitlen.com>
Sat, 25 May 2013 23:36:02 +0000 (00:36 +0100)
committerDarren <darren@darrenwhitlen.com>
Sat, 25 May 2013 23:36:08 +0000 (00:36 +0100)
client/assets/src/views/channel.js

index 3c84ead576cefd712f85570c8483f56aff7a10f8..aaef808188ee16e0e09240ea2a931c31043d5285 100644 (file)
@@ -14,13 +14,15 @@ _kiwi.view.Channel = _kiwi.view.Panel.extend({
         this.initializePanel(options);
         this.model.bind('change:topic', this.topic, this);
 
-        this.model.get('members').bind('add', function (member) {
-            if (member.get('nick') === this.model.collection.network.get('nick')) {
-                this.$el.find('.initial_loader').slideUp(function () {
-                    $(this).remove();
-                });
-            }
-        }, this);
+        if (this.model.get('members')) {
+            this.model.get('members').bind('add', function (member) {
+                if (member.get('nick') === this.model.collection.network.get('nick')) {
+                    this.$el.find('.initial_loader').slideUp(function () {
+                        $(this).remove();
+                    });
+                }
+            }, this);
+        }
 
         // Only show the loader if this is a channel (ie. not a query)
         if (this.model.isChannel()) {