fix: Check for undefined value in InputRow.measure

This commit is contained in:
Alex Zauzolkov
2022-06-14 16:27:46 +10:00
parent 2a7d6b08b5
commit f2e57c06ad

View File

@@ -59,6 +59,9 @@ class InputRow extends Row {
let connectedBlockWidths = 0;
for (let i = 0; i < this.elements.length; i++) {
const elem = this.elements[i];
if (elem === undefined) {
continue;
}
this.width += elem.width;
if (Types.isInput(elem) && elem instanceof InputConnection) {
if (Types.isStatementInput(elem) && elem instanceof StatementInput) {