summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/js/asyncjs.nim6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/js/asyncjs.nim b/lib/js/asyncjs.nim
index 20f7b2300..894102ca0 100644
--- a/lib/js/asyncjs.nim
+++ b/lib/js/asyncjs.nim
@@ -131,12 +131,8 @@ proc generateJsasync(arg: NimNode): NimNode =
 
   let asyncPragma = quote:
     {.codegenDecl: "async function $2($3)".}
-  if arg.pragma.kind == nnkEmpty:
-    result.pragma = asyncPragma
-  else:
-    result.pragma = arg.pragma
-    result.pragma.add(asyncPragma[0])  
 
+  result.addPragma(asyncPragma[0])
 
 macro async*(arg: untyped): untyped =
   ## Macro which converts normal procedures into