Skip to content

Commit

Permalink
fixed possible crash on start
Browse files Browse the repository at this point in the history
  • Loading branch information
Garfonso committed May 20, 2020
1 parent 57d4c67 commit a38ee63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -125,6 +125,7 @@ Or install from admin webpage.
-->
### __WORK IN PROGRESS__
* added 'preventUnnamedDevices' option ot prevent creation of devices that do not report their name. This sometimes happens if devices are talking on CEC bus but are not switched on (depends on device type).
* fixed possible crash on start

### 0.0.2 (2020-01-28)
* fixed a lot of bugs
Expand Down
2 changes: 1 addition & 1 deletion main.js
Expand Up @@ -809,7 +809,7 @@ class CEC2 extends utils.Adapter {
/** @type {stateDefinition} */
const def = stateDefinitions[defString];
const state = await this.getStateAsync(stateObject._id);
if (state) { //unpack val
if (state && !def.readOnly) { //unpack val
existingDevice[def.key || def.name] = state.val; //remember values
}
existingDevice.createdStates.push(defString);
Expand Down

0 comments on commit a38ee63

Please sign in to comment.