From bdc9878f8b1d120aeb2e173e9138ab26da3ca938 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Thu, 12 Nov 2020 20:24:29 -0500 Subject: Fix REPL error reporting for user calls to ! --- docs/repl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/repl.js') diff --git a/docs/repl.js b/docs/repl.js index c45b527c..879acb40 100644 --- a/docs/repl.js +++ b/docs/repl.js @@ -8,7 +8,7 @@ let setcount = !doc.count ? (s=>s) : (s=>{ let setExplain = e=>e; let showErr = (s,e)=>{ let r=e.src, w=e.message, loc=[]; - while (w.sh&&w.sh[0]===2) { + while (w&&w.loc||(r!=='!'&&w.sh&&w.sh[0]===2)) { let is; [is,w]=w; let n=is.sh?is.sh[0]:0, i=n?is[0]:is; let to=i=>s.slice(0,i).join('').split('\n'); -- cgit v1.2.3