diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-02-19 21:37:04 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-02-19 21:37:04 +0100 |
commit | c50256d25c47110119ea3386050040c916f2cf83 (patch) | |
tree | 5ee106d7c2c03276a7a4b11e5322b0ae7a616dd0 /app/assets/javascripts/components/reducers/notifications.jsx | |
parent | 4aa5ebe59142eedbb1aa9dad88c608dda9ad8d6c (diff) |
Fix infinite scrolling breaking after navigation
Diffstat (limited to 'app/assets/javascripts/components/reducers/notifications.jsx')
-rw-r--r-- | app/assets/javascripts/components/reducers/notifications.jsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/assets/javascripts/components/reducers/notifications.jsx b/app/assets/javascripts/components/reducers/notifications.jsx index 4a7af8856..968eae9f6 100644 --- a/app/assets/javascripts/components/reducers/notifications.jsx +++ b/app/assets/javascripts/components/reducers/notifications.jsx @@ -37,9 +37,12 @@ const normalizeNotifications = (state, notifications, next) => { items = items.set(i, notificationToMap(n)); }); + if (state.get('next') === null) { + state = state.set('next', next); + } + return state .update('items', list => loaded ? list.unshift(...items) : list.push(...items)) - .set('next', next) .set('loaded', true) .set('isLoading', false); }; |