Add check for null substackNum, fix numbering

This commit is contained in:
Tim Mickel 2016-06-07 11:29:51 -04:00
parent 8421308782
commit 3b4a00ce46

View file

@ -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;
}