Skip to content

Commit 46f9aea

Browse files
committed
misc/wasm: avoid implicit boolean to number conversion
Fixes #36561 Change-Id: I20cbf95ef4fd7c5c255a93ed3ec3e027a0ce2bc2 Reviewed-on: https://go-review.googlesource.com/c/go/+/214944 Reviewed-by: Richard Musiol <[email protected]>
1 parent 583419e commit 46f9aea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

misc/wasm/wasm_exec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@
440440

441441
// func valueInstanceOf(v ref, t ref) bool
442442
"syscall/js.valueInstanceOf": (sp) => {
443-
this.mem.setUint8(sp + 24, loadValue(sp + 8) instanceof loadValue(sp + 16));
443+
this.mem.setUint8(sp + 24, (loadValue(sp + 8) instanceof loadValue(sp + 16)) ? 1 : 0);
444444
},
445445

446446
// func copyBytesToGo(dst []byte, src ref) (int, bool)

0 commit comments

Comments
 (0)