ProfileMediaPanel: fix crash from syncronous noOp

This commit is contained in:
Alex Gleason 2021-10-13 15:10:26 -05:00
parent e2058d0bcb
commit 73e4d00cc2
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 2 additions and 1 deletions

View File

@ -124,6 +124,7 @@ export function clearTimeline(timeline) {
}
const noOp = () => {};
const noOpAsync = () => () => new Promise(f => f());
const parseTags = (tags = {}, mode) => {
return (tags[mode] || []).map((tag) => {
@ -138,7 +139,7 @@ export function expandTimeline(timelineId, path, params = {}, done = noOp) {
if (timeline.get('isLoading')) {
done();
return dispatch(noOp);
return dispatch(noOpAsync());
}
if (!params.max_id && !params.pinned && timeline.get('items', ImmutableOrderedSet()).size > 0) {