From d5546c6b05aa8a527d45d14cdd415404700a7aa2 Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Mon, 6 Jul 2020 23:44:49 -0500 Subject: [PATCH] dirty hack to fix some wrongful caching --- src/compiler/blocks/compiler_natives.js | 2 +- src/engine/thread.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/blocks/compiler_natives.js b/src/compiler/blocks/compiler_natives.js index cb674a98..f7ce0365 100644 --- a/src/compiler/blocks/compiler_natives.js +++ b/src/compiler/blocks/compiler_natives.js @@ -28,7 +28,7 @@ const number = /** @param {InputUtil} util */ (util) => { const NUM = util.fieldValueUnsafe('NUM'); const number = Number(NUM); if (!Number.isNaN(number)) { - return util.number(number); + return util.number('' + number); } return util.fieldString('NUM'); }; diff --git a/src/engine/thread.js b/src/engine/thread.js index ba71cb4c..8c4379cc 100644 --- a/src/engine/thread.js +++ b/src/engine/thread.js @@ -428,7 +428,7 @@ class Thread { tryCompile(cache) { let result; - const topBlock = this.topBlock; + const topBlock = this.target.id + '|' + this.topBlock; if (cache.hasEntry(topBlock)) { if (cache.isCachedAsError(topBlock)) { return;