kopia lustrzana https://github.com/backface/turtlestitch
refactored reportOr()
rodzic
257c5d23a3
commit
06db4ea86e
|
@ -788,24 +788,20 @@ Process.prototype.reportOr = function (block) {
|
|||
|
||||
if (inputs.length < 1) {
|
||||
this.evaluateNextInput(block);
|
||||
} else {
|
||||
if (inputs.length === 1) {
|
||||
this.assertType(inputs[0], 'Boolean');
|
||||
if (inputs[0]) {
|
||||
if (this.flashContext()) {return; }
|
||||
this.returnValueToParentContext(true);
|
||||
this.popContext();
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (inputs.length < 2) {
|
||||
this.evaluateNextInput(block);
|
||||
} else {
|
||||
this.assertType(inputs[1], 'Boolean');
|
||||
} else if (inputs.length === 1) {
|
||||
this.assertType(inputs[0], 'Boolean');
|
||||
if (inputs[0]) {
|
||||
if (this.flashContext()) {return; }
|
||||
this.returnValueToParentContext(inputs[1] === true);
|
||||
this.returnValueToParentContext(true);
|
||||
this.popContext();
|
||||
} else {
|
||||
this.evaluateNextInput(block);
|
||||
}
|
||||
} else {
|
||||
this.assertType(inputs[1], 'Boolean');
|
||||
if (this.flashContext()) {return; }
|
||||
this.returnValueToParentContext(inputs[1] === true);
|
||||
this.popContext();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue