always pop the stack when the promised value is from the last op

This commit is contained in:
Michael "Z" Goddard 2018-12-17 15:25:26 -05:00
parent 1591c28f28
commit bdebfaf823
No known key found for this signature in database
GPG key ID: 762CD40DD5349872

View file

@ -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 {