From e2932d9d515aa02107732a51563cfb75edc74152 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Thu, 10 Mar 2022 15:07:20 -0700 Subject: [PATCH] fix: Add workaround for SES that reject arrow strings --- src/wtns_debug.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wtns_debug.js b/src/wtns_debug.js index 6fed6d4..0f0ac20 100644 --- a/src/wtns_debug.js +++ b/src/wtns_debug.js @@ -37,13 +37,15 @@ export default async function wtnsDebug(input, wasmFileName, wtnsFileName, symNa if (options.set) { if (!sym) sym = await loadSyms(symName); wcOps.logSetSignal= function(labelIdx, value) { - if (logger) logger.info("SET " + sym.labelIdx2Name[labelIdx] + " <-- " + value.toString()); + // The line below splits the arrow log into 2 strings to avoid some Secure ECMAScript issues + if (logger) logger.info("SET " + sym.labelIdx2Name[labelIdx] + " <" + "-- " + value.toString()); }; } if (options.get) { if (!sym) sym = await loadSyms(symName); wcOps.logGetSignal= function(varIdx, value) { - if (logger) logger.info("GET " + sym.labelIdx2Name[varIdx] + " --> " + value.toString()); + // The line below splits the arrow log into 2 strings to avoid some Secure ECMAScript issues + if (logger) logger.info("GET " + sym.labelIdx2Name[varIdx] + " --" + "> " + value.toString()); }; } if (options.trigger) {