Skip to content

Commit

Permalink
Fix iOS not support promise.finally (#626)
Browse files Browse the repository at this point in the history
* refactor: return promise reject
  • Loading branch information
gz65555 authored Dec 31, 2021
1 parent b3f5503 commit 9a24887
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/asset/ResourceManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,9 @@ export class ResourceManager {
.then((res) => {
if (loader.useCache) this._addAsset(url, res);
})
.catch((err: Error) => Promise.reject(err))
.finally(() => {
.catch((err: Error) => {
delete this._loadingPromises[url];
return Promise.reject(err);
});
return promise;
}
Expand Down

0 comments on commit 9a24887

Please sign in to comment.