Didn't need to declare, needed to hand over config

This commit is contained in:
Skylar Grant 2024-08-15 09:49:24 -04:00
parent 9f42cc6240
commit 89ccd032a9
2 changed files with 3 additions and 3 deletions

View File

@ -26,9 +26,9 @@ export class Communicator {
return this;
}
init(state) {
init(state, config) {
// Connect to the MQTT Broker
const this.client = mqtt.connect(config.mqtt.address);
this.client = mqtt.connect(config.mqtt.address);
const { client } = this;
client.on('connect', () => {

View File

@ -15,7 +15,7 @@ window.onload = async function() {
config = data;
console.log(config);
psState.init(config);
comms.init(psState);
comms.init(psState, config);
refreshState(window.document, psState);
})
.catch(error => {