ProfileMediaPanel: fix crash from syncronous noOp

profile-avatar-switcher
Alex Gleason 2021-10-13 15:10:26 -05:00
rodzic e2058d0bcb
commit 73e4d00cc2
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -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) {