Don't get last of empty list

This commit is contained in:
Ruud committed 2012-05-28 22:09:21 +02:00
1 parent e62b177940
commit ef8dfc082c
1 file changed
+2 -1
@@ -136,7 +136,8 @@ var NotificationBase = new Class({
App.fireEvent(result.type, result)
})
self.last_id = json.result.getLast().message_id
if(json.result.length > 0)
self.last_id = json.result.getLast().message_id
}
// Restart poll