diff --git a/src/nodeClass.js b/src/nodeClass.js index d08c3f9..4ab5ffb 100644 --- a/src/nodeClass.js +++ b/src/nodeClass.js @@ -42,7 +42,7 @@ class nodeClass { // Merge UI config over defaults this.config = { general: { - name: uiConfig.name, + name: uiConfig.name || this.name, id: this.node.id, // node.id is for the child registration process unit: null, logging: { diff --git a/src/specificClass.js b/src/specificClass.js index 596c98c..81d067c 100644 --- a/src/specificClass.js +++ b/src/specificClass.js @@ -6,14 +6,14 @@ class liquidFlowHandler { this.config = config; this.logger = new logger(this.config.general.logging.enabled, this.config.general.logging.logLevel, config.general.name); - this.reactors = Array(2); + this.reactors = [null, null]; this.machines = {}; this.debit = 0; this.childRegistrationUtils = new childRegistrationUtils(this); } updateState(timeStamp) { - effluent = this.reactors[1].getEffluent(); + effluent = this.reactors[1].getEffluent; effluent.payload.F = this.debit; this.reactors[0].setInfluent = effluent; } @@ -27,7 +27,7 @@ class liquidFlowHandler { } getOutput() { - mainEffluent = this.reactors[1].getEffluent(); + mainEffluent = this.reactors[1].getEffluent; sideStream = structuredClone(mainEffluent); mainEffluent.payload.F -= this.debit; sideStream.payload.F = this.debit;