From b300948526d967aaf5608c93546ee0d54940c0ef Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Sun, 30 Dec 2018 12:14:41 +0100 Subject: [PATCH] Fix crash when clearing uninitialized timeline Fixes #875 --- app/javascript/flavours/glitch/reducers/timelines.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/reducers/timelines.js b/app/javascript/flavours/glitch/reducers/timelines.js index acd1278332..d7d5ac43fe 100644 --- a/app/javascript/flavours/glitch/reducers/timelines.js +++ b/app/javascript/flavours/glitch/reducers/timelines.js @@ -83,7 +83,7 @@ const deleteStatus = (state, id, accountId, references) => { }; const clearTimeline = (state, timeline) => { - return state.updateIn([timeline, 'items'], list => list.clear()); + return state.set(timeline, initialTimeline); }; const filterTimelines = (state, relationship, statuses) => {