smashing errors caused by .forEach

This commit is contained in:
Matthias Bartelmeß 2012-03-13 22:44:33 +01:00
parent b28bfe8e31
commit f34f0585bb
4 changed files with 11 additions and 11 deletions

View file

@ -147,10 +147,11 @@ var chat = (function()
}
});
for(var i in clientVars.chatHistory)
{
this.addMessage(clientVars.chatHistory[i], false);
}
var that = this;
$.each(clientVars.chatHistory, function(i, o){
that.addMessage(o, false);
})
$("#chatcounter").text(clientVars.chatHistory.length);
}
}