mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 02:52:44 +08:00
Treat URL as loaded when loading script with tag.
This commit is contained in:
parent
14c2439473
commit
87a1ff15fd
|
@ -38,9 +38,9 @@ export default function loadScript(url, opts) {
|
||||||
$('script').each((i, tag) => {
|
$('script').each((i, tag) => {
|
||||||
const src = tag.getAttribute('src');
|
const src = tag.getAttribute('src');
|
||||||
|
|
||||||
// For some reason, a script tag with `url` as the source is appended into
|
if (src && (opts.scriptTag || src !== url)) {
|
||||||
// the head tag while loading the script.
|
_loaded[tag.getAttribute('src')] = true;
|
||||||
if (src && src !== url) _loaded[tag.getAttribute('src')] = true;
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user