FIX: Broken notification history

This commit is contained in:
riking 2014-09-09 17:25:25 -07:00
parent 51d9a59d53
commit bf06878601
1 changed files with 3 additions and 2 deletions

View File

@ -12,9 +12,10 @@ export default Ember.ArrayController.extend({
self.get('model.lastObject.created_at'), self.get('model.lastObject.created_at'),
self.get('user.username')).then(function(result) { self.get('user.username')).then(function(result) {
self.set('loading', false); self.set('loading', false);
self.pushObjects(result); var notifications = result.get('content');
self.pushObjects(notifications);
// Stop trying if it's the end // Stop trying if it's the end
if (result.length === 0) { if (notifications && notifications.length === 0) {
self.set('canLoadMore', false); self.set('canLoadMore', false);
} }
}).catch(function(error) { }).catch(function(error) {