Skip to content

Commit

Permalink
FIX: Broken notification history
Browse files Browse the repository at this point in the history
  • Loading branch information
riking committed Sep 10, 2014
1 parent 51d9a59 commit bf06878
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ export default Ember.ArrayController.extend({
self.get('model.lastObject.created_at'),
self.get('user.username')).then(function(result) {
self.set('loading', false);
self.pushObjects(result);
var notifications = result.get('content');
self.pushObjects(notifications);
// Stop trying if it's the end
if (result.length === 0) {
if (notifications && notifications.length === 0) {
self.set('canLoadMore', false);
}
}).catch(function(error) {
Expand Down

0 comments on commit bf06878

Please sign in to comment.