Didn't need to declare, needed to hand over config
This commit is contained in:
parent
9f42cc6240
commit
89ccd032a9
@ -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', () => {
|
||||
|
@ -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 => {
|
||||
|
Loading…
Reference in New Issue
Block a user