Fix: better error message
This commit is contained in:
parent
dece4b57f3
commit
7b9348a545
|
@ -23,7 +23,7 @@ var loadScript = (function () {
|
||||||
cache.set(path, script);
|
cache.set(path, script);
|
||||||
};
|
};
|
||||||
script.onerror = event => {
|
script.onerror = event => {
|
||||||
reject(event);
|
reject(new Error(`failed to load script: ${path}`));
|
||||||
script.onload = null;
|
script.onload = null;
|
||||||
script.onerror = null;
|
script.onerror = null;
|
||||||
script.parentNode.removeChild(script);
|
script.parentNode.removeChild(script);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user