Skip to content

Commit

Permalink
[js] Fix bool to integer conversion.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmurias committed Feb 4, 2016
1 parent bc5b1df commit 7e8546d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vm/js/QAST/Compiler.nqp
Expand Up @@ -2660,7 +2660,7 @@ class QAST::CompilerJS does DWIMYNameMangling does SerializeOnce {
return Chunk.new($T_INT, "({$chunk.expr}|0)", [$chunk]);
}
if $got == $T_BOOL {
return Chunk.new($T_INT, "({$chunk.expr} ? '1' : '0')", [$chunk]);
return Chunk.new($T_INT, "({$chunk.expr} ? 1 : 0)", [$chunk]);
}
}

Expand Down

0 comments on commit 7e8546d

Please sign in to comment.