From bdebfaf823d828d7cb3ac673f68d2f5e30f778f1 Mon Sep 17 00:00:00 2001 From: "Michael \"Z\" Goddard" Date: Mon, 17 Dec 2018 15:25:26 -0500 Subject: [PATCH 1/2] always pop the stack when the promised value is from the last op --- src/engine/execute.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/execute.js b/src/engine/execute.js index e7f0946cc..a58a0f7e0 100644 --- a/src/engine/execute.js +++ b/src/engine/execute.js @@ -112,8 +112,8 @@ const handlePromise = (primitiveReportedValue, sequencer, thread, blockCached, l // Promise handlers primitiveReportedValue.then(resolvedValue => { handleReport(resolvedValue, sequencer, thread, blockCached, lastOperation); - // If its a command block. - if (lastOperation && typeof resolvedValue === 'undefined') { + // If its a command block or a top level reporter in a stackClick. + if (lastOperation) { let stackFrame; let nextBlockId; do { From 178bdbd81bafb26c1157cc4ea67cab2ba82035e3 Mon Sep 17 00:00:00 2001 From: picklesrus Date: Tue, 18 Dec 2018 11:01:53 -0500 Subject: [PATCH 2/2] Fix typo in comment --- src/engine/execute.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/execute.js b/src/engine/execute.js index a58a0f7e0..c8638d01a 100644 --- a/src/engine/execute.js +++ b/src/engine/execute.js @@ -112,7 +112,7 @@ const handlePromise = (primitiveReportedValue, sequencer, thread, blockCached, l // Promise handlers primitiveReportedValue.then(resolvedValue => { handleReport(resolvedValue, sequencer, thread, blockCached, lastOperation); - // If its a command block or a top level reporter in a stackClick. + // If it's a command block or a top level reporter in a stackClick. if (lastOperation) { let stackFrame; let nextBlockId;