mirror of
https://github.com/google/blockly.git
synced 2026-01-08 01:20:12 +01:00
fix: Check for empty array in thrasos.RenderInfo.addElemSpacing_ (#6211)
* fix: Check for undefined value in InputRow.measure
* Revert "fix: Check for undefined value in InputRow.measure"
This reverts commit f2e57c06ad.
* fix: thrasos: don't push elements if array is empty
- Use same array length check as geras renderer does
This commit is contained in:
@@ -82,6 +82,9 @@ class RenderInfo extends BaseRenderInfo {
|
||||
row.elements.push(new InRowSpacer(
|
||||
this.constants_, this.getInRowSpacing_(null, oldElems[0])));
|
||||
}
|
||||
if (!oldElems.length) {
|
||||
continue;
|
||||
}
|
||||
for (let e = 0; e < oldElems.length - 1; e++) {
|
||||
row.elements.push(oldElems[e]);
|
||||
const spacing = this.getInRowSpacing_(oldElems[e], oldElems[e + 1]);
|
||||
|
||||
Reference in New Issue
Block a user