0
0
Fork 0

Fix public timelines being broken by new toots when they are not mounted (#10131)

This commit is contained in:
Eugen Rochko 2019-03-07 22:17:52 +01:00 committed by GitHub
parent 09c042aa10
commit be1c634b2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 28 additions and 7 deletions

View file

@ -158,7 +158,9 @@ export function submitCompose(routerHistory) {
// into the columns
const insertIfOnline = timelineId => {
if (getState().getIn(['timelines', timelineId, 'items', 0]) !== null) {
const timeline = getState().getIn(['timelines', timelineId]);
if (timeline && timeline.get('items').size > 0 && timeline.getIn(['items', 0]) !== null && timeline.get('online')) {
dispatch(updateTimeline(timelineId, { ...response.data }));
}
};