Skip to content

Commit

Permalink
fix for random error with middle click addon
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyGamer13 committed Sep 23, 2023
1 parent 307706e commit 8c7162f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/addons/addons/middle-click-popup/BlockTypeInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -437,10 +437,10 @@ export class BlockTypeInfo {
if (input.connection) {
const innerBlock = input.connection.targetBlock();
if (innerBlock) {
if (innerBlock.inputList.length !== 1 || innerBlock.inputList[0].fieldRow.length !== 1)
throw new Error("This should never happen.");
let innerField = innerBlock.inputList[0].fieldRow[0];
addFieldInputs(innerField, inputIdx, -1);
if (!(innerBlock.inputList.length !== 1 || innerBlock.inputList[0].fieldRow.length !== 1)) {
let innerField = innerBlock.inputList[0].fieldRow[0];
addFieldInputs(innerField, inputIdx, -1);
}
} else {
if (input.outlinePath) {
addInput(new BlockInputBoolean(inputIdx, -1));
Expand Down

0 comments on commit 8c7162f

Please sign in to comment.