diff options
author | Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp> | 2018-03-24 21:36:44 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2018-03-24 13:36:44 +0100 |
commit | 59657e24b9737cb2b38ea6b0f9e99192908b15df (patch) | |
tree | e88a66f82526b9949c94bf277e19ffb13739164e /app/javascript | |
parent | fe398a098e9990ee3146e70be9e2cda6227274b8 (diff) |
Rename variables to have semantic meanings in notifications reducer (#6890)
Diffstat (limited to 'app/javascript')
-rw-r--r-- | app/javascript/mastodon/reducers/notifications.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/javascript/mastodon/reducers/notifications.js b/app/javascript/mastodon/reducers/notifications.js index 264db4f55..06c36c89a 100644 --- a/app/javascript/mastodon/reducers/notifications.js +++ b/app/javascript/mastodon/reducers/notifications.js @@ -49,11 +49,11 @@ const normalizeNotification = (state, notification) => { }; const normalizeNotifications = (state, notifications, next) => { - let items = ImmutableList(); + let newItems = ImmutableList(); const loaded = state.get('loaded'); notifications.forEach((n, i) => { - items = items.set(i, notificationToMap(n)); + newItems = newItems.set(i, notificationToMap(n)); }); if (state.get('next') === null) { @@ -61,7 +61,7 @@ const normalizeNotifications = (state, notifications, next) => { } return state - .update('items', list => loaded ? items.concat(list) : list.concat(items)) + .update('items', oldItems => loaded ? newItems.concat(oldItems) : oldItems.concat(newItems)) .set('loaded', true) .set('isLoading', false); }; |