summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--compiler/jsgen.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim
index d8aad0516..972fcf393 100644
--- a/compiler/jsgen.nim
+++ b/compiler/jsgen.nim
@@ -548,7 +548,7 @@ proc genTry(p: PProc, n: PNode, r: var TCompRes) =
   gen(p, n.sons[0], a)
   moveInto(p, a, r)
   var generalCatchBranchExists = false
-  let dollar = rope(if p.target == targetJS: "$" else: "")
+  let dollar = rope(if p.target == targetJS: "" else: "$")
   if p.target == targetJS and catchBranchesExist:
     addf(p.body, "} catch (EXC) {$n var prevJSError = lastJSError;$n" &
         " lastJSError = EXC;$n --excHandler;$n", [])