]> cat aescling's git repositories - mastodon.git/commitdiff
Fix crash when clearing uninitialized timeline (#9662)
authorThibG <thib@sitedethib.com>
Sun, 30 Dec 2018 17:57:39 +0000 (18:57 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Sun, 30 Dec 2018 17:57:39 +0000 (18:57 +0100)
app/javascript/mastodon/reducers/timelines.js

index beab2ea038ab311123d1871a173c2680364abccd..1f7ece8122f2e3f74c935c11ee117232d42f9f18 100644 (file)
@@ -88,7 +88,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) => {