mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-03-21 21:00:16 -04:00
Add check for null substackNum
, fix numbering
This commit is contained in:
parent
8421308782
commit
3b4a00ce46
1 changed files with 2 additions and 1 deletions
|
@ -56,9 +56,10 @@
|
||||||
Blocks.prototype.getSubstack = function (id, substackNum) {
|
Blocks.prototype.getSubstack = function (id, substackNum) {
|
||||||
var block = this._blocks[id];
|
var block = this._blocks[id];
|
||||||
if (typeof block === 'undefined') return null;
|
if (typeof block === 'undefined') return null;
|
||||||
|
if (!substackNum) substackNum = 1;
|
||||||
|
|
||||||
var inputName = 'SUBSTACK';
|
var inputName = 'SUBSTACK';
|
||||||
if (substackNum > 0) {
|
if (substackNum > 1) {
|
||||||
inputName += substackNum;
|
inputName += substackNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue