ProfileMediaPanel: fix crash from syncronous noOp
This commit is contained in:
parent
e2058d0bcb
commit
73e4d00cc2
|
@ -124,6 +124,7 @@ export function clearTimeline(timeline) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const noOp = () => {};
|
const noOp = () => {};
|
||||||
|
const noOpAsync = () => () => new Promise(f => f());
|
||||||
|
|
||||||
const parseTags = (tags = {}, mode) => {
|
const parseTags = (tags = {}, mode) => {
|
||||||
return (tags[mode] || []).map((tag) => {
|
return (tags[mode] || []).map((tag) => {
|
||||||
|
@ -138,7 +139,7 @@ export function expandTimeline(timelineId, path, params = {}, done = noOp) {
|
||||||
|
|
||||||
if (timeline.get('isLoading')) {
|
if (timeline.get('isLoading')) {
|
||||||
done();
|
done();
|
||||||
return dispatch(noOp);
|
return dispatch(noOpAsync());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!params.max_id && !params.pinned && timeline.get('items', ImmutableOrderedSet()).size > 0) {
|
if (!params.max_id && !params.pinned && timeline.get('items', ImmutableOrderedSet()).size > 0) {
|
||||||
|
|
Loading…
Reference in New Issue