Skip to content

Commit 19655a9

Browse files
committed
fixed caller
1 parent 533d7a2 commit 19655a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wasm/sample/public/caller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ const send = (name, request) => {
3939
reject('callbackMessageError: ' + e)
4040
}
4141
const callback = (e) => {
42-
myWorker.removeEventListener('message', callback)
4342
const data = e.data || {}
4443
if (id !== data.id) {
4544
// if not same if we should not reject
4645
return
4746
}
47+
myWorker.removeEventListener('message', callback)
4848
const {error, response} = data;
4949
if (error) {
5050
reject(error)

0 commit comments

Comments
 (0)