From: Eugen Rochko Date: Mon, 17 Oct 2016 23:48:46 +0000 (+0200) Subject: Small clean up X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=7bb72ff198d9fb0747f8ded25140be35943484a0;p=mastodon.git Small clean up --- diff --git a/app/assets/javascripts/components/reducers/timelines.jsx b/app/assets/javascripts/components/reducers/timelines.jsx index b6a14a649..65bccb44d 100644 --- a/app/assets/javascripts/components/reducers/timelines.jsx +++ b/app/assets/javascripts/components/reducers/timelines.jsx @@ -78,12 +78,14 @@ function normalizeStatus(state, status) { }; function normalizeTimeline(state, timeline, statuses) { + let ids = Immutable.List([]); + statuses.forEach((status, i) => { state = normalizeStatus(state, status); - state = state.setIn([timeline, i], status.get('id')); + ids = ids.set(i, status.get('id')); }); - return state; + return state.set(timeline, ids); }; function appendNormalizedTimeline(state, timeline, statuses) {