Skip to content

Commit d0bf1c3

Browse files
committed
Define default values for options in the port handler
1 parent 324bec6 commit d0bf1c3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/js/port_handler.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ const PortHandler = new function () {
2222
selectedBauds: DEFAULT_BAUDS,
2323
portOverride: getConfig('portOverride', '/dev/rfcomm0').portOverride,
2424
virtualMspVersion: "1.46.0",
25-
autoConnect: getConfig('autoConnect').autoConnect,
25+
autoConnect: getConfig('autoConnect', false).autoConnect,
2626
};
2727
this.portPickerDisabled = false;
2828
this.dfuAvailable = false;
2929
this.portAvailable = false;
3030
this.showAllSerialDevices = false;
31-
this.showVirtualMode = getConfig('showVirtualMode').showVirtualMode;
32-
this.showManualMode = getConfig('showManualMode').showManualMode;
33-
this.showAllSerialDevices = getConfig('showAllSerialDevices').showAllSerialDevices;
31+
this.showVirtualMode = getConfig('showVirtualMode', false).showVirtualMode;
32+
this.showManualMode = getConfig('showManualMode', false).showManualMode;
33+
this.showAllSerialDevices = getConfig('showAllSerialDevices', false).showAllSerialDevices;
3434
};
3535

3636
PortHandler.initialize = function () {

0 commit comments

Comments
 (0)