options are null when not provided
This commit is contained in:
@ -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
|
||||||
|
Reference in New Issue
Block a user