mirror of
https://github.com/discourse/discourse.git
synced 2025-06-10 17:57:48 +08:00
DEV: Don't leave loadScript tests hanging (#16536)
…when anything goes wrong. Let it move on instead of waiting for global test timeout.
This commit is contained in:
@ -20,6 +20,11 @@ function loadWithTag(path, cb) {
|
|||||||
registerWaiter(() => finished);
|
registerWaiter(() => finished);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Don't leave it hanging if something goes wrong
|
||||||
|
s.onerror = function () {
|
||||||
|
finished = true;
|
||||||
|
};
|
||||||
|
|
||||||
s.onload = s.onreadystatechange = function (_, abort) {
|
s.onload = s.onreadystatechange = function (_, abort) {
|
||||||
finished = true;
|
finished = true;
|
||||||
if (
|
if (
|
||||||
|
Reference in New Issue
Block a user