Skip to content

Commit

Permalink
Prepend the promise to methods only after it is constructed.
Browse files Browse the repository at this point in the history
  • Loading branch information
adamziel committed Jun 21, 2023
1 parent e9f132e commit a9cc3b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/php-wasm/universal/src/lib/load-php-runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,9 @@ const makePromise = () => {
const methods: any = [];

const promise = new Promise((resolve, reject) => {
methods.push(promise, resolve, reject);
methods.push(resolve, reject);
});
methods.unshift(promise);

return methods as [Promise<any>, (v?: any) => void, (e?: any) => void];
};
Expand Down

0 comments on commit a9cc3b1

Please sign in to comment.