FIX: Topic featured links not getting oneboxed immediately.
This commit is contained in:
parent
52cd9972bb
commit
375f3feeb8
|
@ -30,7 +30,7 @@ function loadNext(ajax) {
|
|||
failedCache[url] = true;
|
||||
}
|
||||
}).finally(() => {
|
||||
timeout = setTimeout(() => loadNext(ajax), timeoutMs);
|
||||
timeout = Ember.run.later(() => loadNext(ajax), timeoutMs);
|
||||
if (removeLoading) {
|
||||
elem.removeClass('loading-onebox');
|
||||
elem.data('onebox-loaded');
|
||||
|
@ -67,7 +67,11 @@ export function load(e, refresh, ajax, userId) {
|
|||
loadingQueue.push({ url, refresh, elem, userId });
|
||||
|
||||
// Load next url in queue
|
||||
timeout = timeout || setTimeout(() => loadNext(ajax), 150);
|
||||
if (timeout) {
|
||||
return Ember.run.later(() => loadNext(ajax), 150);
|
||||
} else {
|
||||
return loadNext(ajax);
|
||||
}
|
||||
}
|
||||
|
||||
export function lookupCache(url) {
|
||||
|
|
Loading…
Reference in New Issue