summary refs log tree commit diff stats
path: root/lib/js/asyncjs.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/js/asyncjs.nim')
-rw-r--r--lib/js/asyncjs.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/js/asyncjs.nim b/lib/js/asyncjs.nim
index 045d1e6b5..9b043f3e5 100644
--- a/lib/js/asyncjs.nim
+++ b/lib/js/asyncjs.nim
@@ -243,7 +243,7 @@ since (1, 5, 1):
     else:
       type A = impl(onSuccess(default(T)))
     var ret: A
-    asm "`ret` = `future`.then(`onSuccess`, `onReject`)"
+    {.emit: "`ret` = `future`.then(`onSuccess`, `onReject`);".}
     return ret
 
   proc catch*[T](future: Future[T], onReject: OnReject): Future[void] =
@@ -266,4 +266,4 @@ since (1, 5, 1):
 
       discard main()
 
-    asm "`result` = `future`.catch(`onReject`)"
+    {.emit: "`result` = `future`.catch(`onReject`);".}