From 892dac5fbc1bc6c58b3c5a6121f2c9b868dec0f3 Mon Sep 17 00:00:00 2001 From: Tor Hveem Date: Fri, 28 Feb 2014 01:08:11 +0100 Subject: [PATCH] Variable fix, and compare fix --- js/glowingbear.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/glowingbear.js b/js/glowingbear.js index ec2138b..01105ed 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -433,7 +433,7 @@ function($rootScope, buffer.lines.length = 0; buffer.requestedLines = 0; // Count number of lines recieved - var newLength = lineinfo.objects[0].content.length; + var linesReceivedCount = lineinfo.objects[0].content.length; // Parse the lines handlers.handleLineInfo(lineinfo, true); @@ -449,11 +449,11 @@ function($rootScope, buffer.lastSeen -= oldLength; } // We request more lines, but didn't get more. No more lines! - if (oldLength === newLength) { + if (oldLength === buffer.lines.length) { $rootScope.noMoreLines = true; } // We requested more lines than we got, no more lines. - if (newLength < numLines) { + if (linesReceivedCount < numLines) { $rootScope.noMoreLines = true; } $rootScope.loadingLines = false;