mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 15:24:55 +08:00
Merge branch '4.0' into 4.1-beta
# Conflicts: # spine-lua/spine-lua/AnimationState.lua # spine-ts/package-lock.json # spine-ts/package.json # spine-ts/spine-canvas/package.json # spine-ts/spine-core/package.json # spine-ts/spine-player/package.json # spine-ts/spine-threejs/package.json # spine-ts/spine-webgl/package.json
This commit is contained in:
commit
0e82c97cb5
@ -308,7 +308,7 @@ export class Downloader {
|
||||
this.finish(url, request.status, request.response);
|
||||
};
|
||||
request.onload = () => {
|
||||
if (request.status == 200)
|
||||
if (request.status == 200 || request.status == 0)
|
||||
this.finish(url, 200, new Uint8Array(request.response as ArrayBuffer));
|
||||
else
|
||||
onerror();
|
||||
@ -330,7 +330,7 @@ export class Downloader {
|
||||
private finish (url: string, status: number, data: any) {
|
||||
let callbacks = this.callbacks[url];
|
||||
delete this.callbacks[url];
|
||||
let args = status == 200 ? [data] : [status, data];
|
||||
let args = status == 200 || status == 0 ? [data] : [status, data];
|
||||
for (let i = args.length - 1, n = callbacks.length; i < n; i += 2)
|
||||
callbacks[i].apply(null, args);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user