Description
In js/blocks.js, there is unreachable/dead code where an inner if condition is always false because it contradicts the outer while loop condition.
Location
File: js/blocks.js
Lines: 1418-1421
Bug Details
while (block?.name == "vspace") {
if (block?.name != "vspace") { // BUG: Always false - contradicts while condition
break; // DEAD CODE: Never executes
}
block = this.blockList[block.connections[0]];
if (block?.name == "newnote") {
return;
}
}
Problem
- The while loop condition checks block?.name == "vspace"
- Inside the loop, the if checks block?.name != "vspace"
- This if condition is always false because we just confirmed the opposite in the while
- The break statement is dead code that can never execute
Expected Behavior
- The inner if block should be removed as it serves no purpose.
Description
In
js/blocks.js, there is unreachable/dead code where an innerifcondition is always false because it contradicts the outerwhileloop condition.Location
File:
js/blocks.jsLines: 1418-1421
Bug Details
Problem
Expected Behavior