homebridge-midea-platform 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -75,11 +75,11 @@ class UiServer extends HomebridgePluginUiServer {
75
75
  super();
76
76
  // Obtain the plugin configuration from homebridge config JSON file.
77
77
  const config = require(this.homebridgeConfigPath).platforms.find((obj) => obj.platform === 'midea-platform');
78
- this.logger = new Logger(config.uiDebug ? config.uiDebug : false);
78
+ this.logger = new Logger(config?.uiDebug ? config.uiDebug : false);
79
79
  this.logger.info(`Custom UI created.`);
80
80
  this.logger.debug(`ENV:\n${JSON.stringify(process.env, null, 2)}`);
81
81
  this.security = new LocalSecurity();
82
- this.promiseSocket = new PromiseSocket(this.logger, config.logRecoverableErrors ? config.logRecoverableErrors : false);
82
+ this.promiseSocket = new PromiseSocket(this.logger, config?.logRecoverableErrors ? config.logRecoverableErrors : false);
83
83
 
84
84
  this.onRequest('/login', async ({ username, password, registeredApp }) => {
85
85
  try {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Homebridge Midea",
3
3
  "name": "homebridge-midea-platform",
4
- "version": "0.4.2",
4
+ "version": "0.4.3",
5
5
  "description": "Homebridge plugin for Midea devices",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {