From 41e6add6c19f586c20a05b135dc3fe4e6b7ce63d Mon Sep 17 00:00:00 2001 From: Anton Date: Sun, 26 Jun 2022 17:59:13 +0300 Subject: [PATCH] fix: fix `$.raw` context --- src/main/js/index.mjs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/main/js/index.mjs b/src/main/js/index.mjs index 1d8c373..93513b9 100644 --- a/src/main/js/index.mjs +++ b/src/main/js/index.mjs @@ -26,15 +26,7 @@ export const $ = new DeepProxy(_$, ({DEFAULT, target: t, trapName, args}) => { export const ctx = (cb, ref = $.bind(null)) => _ctx(cb, ref) -$.raw = async (...args) => { - const q = $.quote - $.quote = v => v - try { - return $(...args) - } finally { - $.quote = q - } -} +$.raw = async (...args) => $.o({quote: v => v})(...args) // https://github.com/google/zx/pull/134 $.silent = async (...args) => quiet($(...args))