From b2f8944b1f0e1e4de409939a7979cfc468864802 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Tue, 5 Nov 2019 18:18:10 +0300 Subject: [PATCH] fix V.js --- vlib/compiler/parser.v | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vlib/compiler/parser.v b/vlib/compiler/parser.v index b514b217dc..0ccef455cc 100644 --- a/vlib/compiler/parser.v +++ b/vlib/compiler/parser.v @@ -3385,7 +3385,9 @@ fn (p mut Parser) for_st() { }) // TODO don't generate if it's not used. // Otherwise it's a C warning + perf. - p.genln('bool last = $i == $tmp . len - 1;') + if !p.is_js { + p.genln('bool last = $i == $tmp . len - 1;') + } } else if is_str { typ = 'byte'