mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
Only visually report when an actual value was returned
This commit is contained in:
parent
9c6dca8131
commit
1f19d7a209
1 changed files with 4 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue