mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 15:02:52 -05:00
Fix lint issues
This commit is contained in:
parent
b9ebf92d68
commit
a141bfb1b9
1 changed files with 5 additions and 5 deletions
|
@ -21,7 +21,7 @@ var execute = function (sequencer, thread) {
|
||||||
var target = thread.target;
|
var target = thread.target;
|
||||||
|
|
||||||
// Stop if block or target no longer exists.
|
// Stop if block or target no longer exists.
|
||||||
if (target == null) {
|
if (target === null) {
|
||||||
// No block found: stop the thread; script no longer exists.
|
// No block found: stop the thread; script no longer exists.
|
||||||
sequencer.retireThread(thread);
|
sequencer.retireThread(thread);
|
||||||
return;
|
return;
|
||||||
|
@ -33,11 +33,11 @@ var execute = function (sequencer, thread) {
|
||||||
|
|
||||||
var blockContainer = target.blocks;
|
var blockContainer = target.blocks;
|
||||||
var block = blockContainer.getBlock(currentBlockId);
|
var block = blockContainer.getBlock(currentBlockId);
|
||||||
if (block === undefined) {
|
if (typeof block === 'undefined') {
|
||||||
blockContainer = runtime.flyoutBlocks;
|
blockContainer = runtime.flyoutBlocks;
|
||||||
block = blockContainer.getBlock(currentBlockId);
|
block = blockContainer.getBlock(currentBlockId);
|
||||||
// Stop if block or target no longer exists.
|
// Stop if block or target no longer exists.
|
||||||
if (block === undefined) {
|
if (typeof block === 'undefined') {
|
||||||
// No block found: stop the thread; script no longer exists.
|
// No block found: stop the thread; script no longer exists.
|
||||||
sequencer.retireThread(thread);
|
sequencer.retireThread(thread);
|
||||||
return;
|
return;
|
||||||
|
@ -105,7 +105,7 @@ var execute = function (sequencer, thread) {
|
||||||
// it's treated as a predicate; if not, execution will proceed as a no-op.
|
// it's treated as a predicate; if not, execution will proceed as a no-op.
|
||||||
// For single-field shadows: If the block has a single field, and no inputs,
|
// For single-field shadows: If the block has a single field, and no inputs,
|
||||||
// immediately return the value of the field.
|
// immediately return the value of the field.
|
||||||
if (blockFunction == null) {
|
if (typeof blockFunction === 'undefined') {
|
||||||
if (isHat) {
|
if (isHat) {
|
||||||
// Skip through the block (hat with no predicate).
|
// Skip through the block (hat with no predicate).
|
||||||
return;
|
return;
|
||||||
|
@ -134,7 +134,7 @@ var execute = function (sequencer, thread) {
|
||||||
var input = inputs[inputName];
|
var input = inputs[inputName];
|
||||||
var inputBlockId = input.block;
|
var inputBlockId = input.block;
|
||||||
// Is there no value for this input waiting in the stack frame?
|
// Is there no value for this input waiting in the stack frame?
|
||||||
if (inputBlockId != null && typeof currentStackFrame.reported[inputName] === 'undefined') {
|
if (inputBlockId !== null && typeof currentStackFrame.reported[inputName] === 'undefined') {
|
||||||
// If there's not, we need to evaluate the block.
|
// If there's not, we need to evaluate the block.
|
||||||
// Push to the stack to evaluate the reporter block.
|
// Push to the stack to evaluate the reporter block.
|
||||||
thread.pushStack(inputBlockId);
|
thread.pushStack(inputBlockId);
|
||||||
|
|
Loading…
Reference in a new issue