Skip to content

Commit a9d1b34

Browse files
committed
Fix coercion of strings to bool.
1 parent 485c280 commit a9d1b34

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/vm/js/QAST/Compiler.nqp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2054,10 +2054,8 @@ class QAST::CompilerJS does DWIMYNameMangling does SerializeOnce {
20542054
}
20552055

20562056
if $desired == $T_BOOL {
2057-
if $got == $T_INT || $got == $T_NUM {
2057+
if $got == $T_INT || $got == $T_NUM || $got == $T_STR {
20582058
return Chunk.new($T_BOOL, $chunk.expr, [$chunk]);
2059-
} elsif $got == $T_STR {
2060-
return $chunk;
20612059
}
20622060
}
20632061

0 commit comments

Comments
 (0)