fix funny off-by-one thing

pull/1/head
ansuz 2017-07-12 18:49:33 +02:00
parent f450a28d11
commit 89af8e4472
1 changed files with 1 additions and 1 deletions

View File

@ -214,7 +214,7 @@ define([
var messages = channel.messages;
var $messages = $chat.find('.messages');
var $msg, msg, date, name;
var last = channel.lastDisplayed || -1;
var last = typeof(channel.lastDisplayed) === 'number'? channel.lastDisplayed: -1;
for (var i = last + 1; i<messages.length; i++) {
msg = messages[i][1]; // 0 is the hash, 1 the array
$msg = $('<div>', {'class': 'message'}).appendTo($messages);