From a19a10a3096f0fa6add9dbd06de327c22b942c5c Mon Sep 17 00:00:00 2001 From: Nikolaj Frey Date: Tue, 15 Aug 2023 11:16:53 +1000 Subject: [PATCH] feat: feature/mvp-sprint-1 --- remix/app/components/Commander/Commander.tsx | 1 + remix/app/components/Commander/CommanderV1.tsx | 2 ++ 2 files changed, 3 insertions(+) diff --git a/remix/app/components/Commander/Commander.tsx b/remix/app/components/Commander/Commander.tsx index d8941f7..a097705 100644 --- a/remix/app/components/Commander/Commander.tsx +++ b/remix/app/components/Commander/Commander.tsx @@ -316,6 +316,7 @@ export const Commander = (props) => { // likely literaly javascript wasn't valid try { const fn = `() => { return ${escapedCommandValue} }` + const tt = thingtime const evalFn = eval(fn) const realVal = evalFn() const prevVal = getThingtime(commandPath) diff --git a/remix/app/components/Commander/CommanderV1.tsx b/remix/app/components/Commander/CommanderV1.tsx index 4f38ba9..db0fd9d 100644 --- a/remix/app/components/Commander/CommanderV1.tsx +++ b/remix/app/components/Commander/CommanderV1.tsx @@ -279,6 +279,7 @@ export const CommanderV1 = (props) => { try { // first try to execute literal javscript const fn = `() => { return ${commandValue} }` + const tt = thingtime const evalFn = eval(fn) const realVal = evalFn() setThingtime(commandPath, realVal) @@ -291,6 +292,7 @@ export const CommanderV1 = (props) => { // likely literaly javascript wasn't valid try { const fn = `() => { return ${escapedCommandValue} }` + const tt = thingtime const evalFn = eval(fn) const realVal = evalFn() const prevVal = getThingtime(commandPath)