From 3d6b55e53ef0d9e483d413242241283a7addfac4 Mon Sep 17 00:00:00 2001 From: tophf Date: Thu, 23 Jun 2022 21:29:52 +0300 Subject: [PATCH] error may be an object --- edit/base.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edit/base.js b/edit/base.js index 2ee946b9..b983f525 100644 --- a/edit/base.js +++ b/edit/base.js @@ -419,7 +419,7 @@ function LivePreview() { el.hidden = true; } catch (err) { if (Array.isArray(err)) { - err = err.join('\n'); + err = err.map(e => e.message || e).join('\n'); } else if (err && err.index != null) { // FIXME: this would fail if editors[0].getValue() !== data.sourceCode const pos = editor.getEditors()[0].posFromIndex(err.index);