Keep channel length up to date
authorCory Chaplin <cory.chaplin@laposte.net>
Mon, 3 Mar 2014 19:44:54 +0000 (20:44 +0100)
committerCory Chaplin <cory.chaplin@laposte.net>
Mon, 3 Mar 2014 19:44:54 +0000 (20:44 +0100)
client/src/applets/chanlist.js

index 2cc676ae1c64bb8a2b1bfd08826c2ee59c47497e..9791a4a7d35453a915e857fed63ca5c3ea6608b8 100644 (file)
@@ -31,7 +31,6 @@
             var table = $('table', this.$el),\r
                 tbody = table.children('tbody:first').detach(),\r
                 that = this,\r
-                channels_length = this.channels.length,\r
                 i;\r
             \r
             if (override_channels !== undefined) {\r
@@ -79,7 +78,7 @@
                 }\r
             });\r
 \r
-            for (i = 0; i < channels_length; i++) {\r
+            for (i = 0; i < this.channels.length; i++) {\r
                 tbody[0].appendChild(this.channels[i].dom);\r
             }\r
             table[0].appendChild(tbody[0]);\r