FIX: Concurently loading deferred loading of a script incorrectly resolves the promise.
This commit is contained in:
parent
d613f3f559
commit
2ddf2e0e95
|
@ -37,7 +37,10 @@ export default function loadScript(url, opts) {
|
||||||
|
|
||||||
$('script').each((i, tag) => {
|
$('script').each((i, tag) => {
|
||||||
const src = tag.getAttribute('src');
|
const src = tag.getAttribute('src');
|
||||||
if (src) _loaded[tag.getAttribute('src')] = true;
|
|
||||||
|
// For some reason, a script tag with `url` as the source is appended into
|
||||||
|
// the head tag while loading the script.
|
||||||
|
if (src && src !== url) _loaded[tag.getAttribute('src')] = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue