mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-22 22:12:28 -05: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) {
|
||||
var block = this._blocks[id];
|
||||
if (typeof block === 'undefined') return null;
|
||||
if (!substackNum) substackNum = 1;
|
||||
|
||||
var inputName = 'SUBSTACK';
|
||||
if (substackNum > 0) {
|
||||
if (substackNum > 1) {
|
||||
inputName += substackNum;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue