From 96d7b278b4996f61b5e568eb6209ed517838fa01 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Tue, 8 Aug 2023 10:29:54 -0400 Subject: [PATCH] Output scriplet errors to console in dev build --- src/js/scriptlet-filtering.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/js/scriptlet-filtering.js b/src/js/scriptlet-filtering.js index 43ddfc093..207af9fb5 100644 --- a/src/js/scriptlet-filtering.js +++ b/src/js/scriptlet-filtering.js @@ -192,10 +192,11 @@ const lookupScriptlet = function(rawToken, mainMap, isolatedMap) { } targetWorldMap.set(rawToken, [ 'try {', - '// >>>> scriptlet start', - content, - '// <<<< scriptlet end', + '// >>>> scriptlet start', + content, + '// <<<< scriptlet end', '} catch (e) {', + isDevBuild ? 'console.error(e);' : '', '}', ].join('\n')); };