options are null when not provided
This commit is contained in:
parent
445452d7f5
commit
a6958e1451
1 changed files with 3 additions and 3 deletions
|
|
@ -32,9 +32,9 @@ const options = commandLineArgs([
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// get options and fallback to default values
|
// get options and fallback to default values
|
||||||
const mqttBrokerUrl = options["mqtt-broker-url"] || "mqtt://mqtt.meshtastic.org";
|
const mqttBrokerUrl = options["mqtt-broker-url"] ?? "mqtt://mqtt.meshtastic.org";
|
||||||
const mqttUsername = options["mqtt-username"] || "meshdev";
|
const mqttUsername = options["mqtt-username"] ?? "meshdev";
|
||||||
const mqttPassword = options["mqtt-password"] || "large4cats";
|
const mqttPassword = options["mqtt-password"] ?? "large4cats";
|
||||||
const collectServiceEnvelopes = options["collect-service-envelopes"] ?? false;
|
const collectServiceEnvelopes = options["collect-service-envelopes"] ?? false;
|
||||||
|
|
||||||
// create mqtt client
|
// create mqtt client
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue