From 1f19d7a20932d64a08fc8859cc222d022d04b8af Mon Sep 17 00:00:00 2001 From: Tim Mickel <tim.mickel@gmail.com> Date: Thu, 7 Jul 2016 19:44:26 -0400 Subject: [PATCH] Only visually report when an actual value was returned --- src/engine/execute.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/engine/execute.js b/src/engine/execute.js index db111637d..8d750eee3 100644 --- a/src/engine/execute.js +++ b/src/engine/execute.js @@ -97,7 +97,8 @@ var execute = function (sequencer, thread) { // Promise resolved: the primitive reported a value. thread.pushReportedValue(resolvedValue); // Report the value visually if necessary. - if (thread.peekStack() === thread.topBlock) { + if (typeof resolvedValue !== 'undefined' && + thread.peekStack() === thread.topBlock) { runtime.visualReport(thread.peekStack(), resolvedValue); } thread.setStatus(Thread.STATUS_RUNNING); @@ -112,7 +113,8 @@ var execute = function (sequencer, thread) { } else if (thread.status === Thread.STATUS_RUNNING) { thread.pushReportedValue(primitiveReportedValue); // Report the value visually if necessary. - if (thread.peekStack() === thread.topBlock) { + if (typeof primitiveReportedValue !== 'undefined' && + thread.peekStack() === thread.topBlock) { runtime.visualReport(thread.peekStack(), primitiveReportedValue); } }