diff --git a/lib/hyperscript/compiler.sx b/lib/hyperscript/compiler.sx index 2012ef95..cac9a430 100644 --- a/lib/hyperscript/compiler.sx +++ b/lib/hyperscript/compiler.sx @@ -1899,13 +1899,16 @@ (make-symbol raw-fn) (hs-to-sx raw-fn))) (args (map hs-to-sx (rest (rest ast))))) - (if - (and (list? raw-fn) (= (first raw-fn) (quote ref))) - (list - (quote hs-win-call) - (nth raw-fn 1) - (cons (quote list) args)) - (cons fn-expr args)))) + (let + ((call-expr + (if + (and (list? raw-fn) (= (first raw-fn) (quote ref))) + (list + (quote hs-win-call) + (nth raw-fn 1) + (cons (quote list) args)) + (cons fn-expr args)))) + (emit-set (quote the-result) call-expr)))) ((= head (quote return)) (let ((val (nth ast 1))) diff --git a/shared/static/wasm/sx/hs-compiler.sx b/shared/static/wasm/sx/hs-compiler.sx index 2012ef95..cac9a430 100644 --- a/shared/static/wasm/sx/hs-compiler.sx +++ b/shared/static/wasm/sx/hs-compiler.sx @@ -1899,13 +1899,16 @@ (make-symbol raw-fn) (hs-to-sx raw-fn))) (args (map hs-to-sx (rest (rest ast))))) - (if - (and (list? raw-fn) (= (first raw-fn) (quote ref))) - (list - (quote hs-win-call) - (nth raw-fn 1) - (cons (quote list) args)) - (cons fn-expr args)))) + (let + ((call-expr + (if + (and (list? raw-fn) (= (first raw-fn) (quote ref))) + (list + (quote hs-win-call) + (nth raw-fn 1) + (cons (quote list) args)) + (cons fn-expr args)))) + (emit-set (quote the-result) call-expr)))) ((= head (quote return)) (let ((val (nth ast 1)))