From bf0687860147b2e205f0edb658aaefb6ff5146ee Mon Sep 17 00:00:00 2001 From: riking Date: Tue, 9 Sep 2014 17:25:25 -0700 Subject: [PATCH] FIX: Broken notification history --- .../discourse/controllers/user-notifications.js.es6 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/controllers/user-notifications.js.es6 b/app/assets/javascripts/discourse/controllers/user-notifications.js.es6 index 6bb5aee5201..43394e6453c 100644 --- a/app/assets/javascripts/discourse/controllers/user-notifications.js.es6 +++ b/app/assets/javascripts/discourse/controllers/user-notifications.js.es6 @@ -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) {