Skip to content

Commit 7e8546d

Browse files
committed
[js] Fix bool to integer conversion.
1 parent bc5b1df commit 7e8546d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vm/js/QAST/Compiler.nqp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2660,7 +2660,7 @@ class QAST::CompilerJS does DWIMYNameMangling does SerializeOnce {
26602660
return Chunk.new($T_INT, "({$chunk.expr}|0)", [$chunk]);
26612661
}
26622662
if $got == $T_BOOL {
2663-
return Chunk.new($T_INT, "({$chunk.expr} ? '1' : '0')", [$chunk]);
2663+
return Chunk.new($T_INT, "({$chunk.expr} ? 1 : 0)", [$chunk]);
26642664
}
26652665
}
26662666

0 commit comments

Comments
 (0)