Skip to content

Commit b239c99

Browse files
committed
fix error not simulating when unpowered breadboard
1 parent f539a1f commit b239c99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ArduinoFrontend/src/app/Libs/Utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ export class Utils {
183183
};
184184
static checkShortCircuit() {
185185
const powerConnections = BreadBoard.checkBreadboardPowerConnections();
186-
if (BreadBoard.checkAllPinsConnectedToOneRail(powerConnections.poweredRail)) {
186+
if (powerConnections.poweredRail != null && BreadBoard.checkAllPinsConnectedToOneRail(powerConnections.poweredRail)) {
187187
return true;
188188
} else {
189189
return false;

0 commit comments

Comments
 (0)