Fix: do not handle empty hotlist message

This commit is contained in:
Philippe Proulx 2013-10-19 14:07:08 -04:00
parent 453a8d5ef3
commit 1e66b16da9
1 changed files with 3 additions and 0 deletions

View File

@ -103,6 +103,9 @@ weechat.factory('handlers', ['$rootScope', 'colors', 'models', 'plugins', functi
* Handle answers to hotlist request
*/
var handleHotlistInfo = function(message) {
if (message.objects.length == 0) {
return;
}
var hotlist = message['objects'][0]['content'];
hotlist.forEach(function(l) {
var buffer = models.getBuffer(l.buffer);