Skip to content

Commit

Permalink
Avoid using promise.catch in waitPromise
Browse files Browse the repository at this point in the history
`promise.catch` is not included in PromiseLike
  • Loading branch information
FurryR committed Jan 17, 2024
1 parent 46b9766 commit 72cdbc2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/compiler/jsexecute.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@ const waitPromise = function*(promise) {
.then(value => {
returnValue = value;
thread.status = 0; // STATUS_RUNNING
})
.catch(error => {
}, error => {
thread.status = 0; // STATUS_RUNNING
globalState.log.warn('Promise rejected in compiled script:', error);
});
Expand Down

0 comments on commit 72cdbc2

Please sign in to comment.