Skip to content

Commit

Permalink
* fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Apollon77 committed May 27, 2022
1 parent baaa5cc commit 6ed600c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2271,7 +2271,7 @@ function getHistoryIflx2(adapter, msg) {
return;
}
let supportsAggregates;
if (adapter._influxDPs[options.id][adapter.namespace].storageType && adapter._influxDPs[options.id][adapter.namespace].storageType !== 'Number') {
if (adapter._influxDPs[options.id] && adapter._influxDPs[options.id][adapter.namespace] && adapter._influxDPs[options.id][adapter.namespace].storageType && adapter._influxDPs[options.id][adapter.namespace].storageType !== 'Number') {
supportsAggregates = false;
} else if (error) {
if (error.message.includes('type conflict: bool')) {
Expand All @@ -2294,9 +2294,9 @@ function getHistoryIflx2(adapter, msg) {
}
}
if (supportsAggregates) {
if (adapter._influxDPs[options.id][adapter.namespace].state && typeof adapter._influxDPs[options.id][adapter.namespace].state.val !== 'number') {
if (adapter._influxDPs[options.id] && adapter._influxDPs[options.id][adapter.namespace] && adapter._influxDPs[options.id][adapter.namespace].state && typeof adapter._influxDPs[options.id][adapter.namespace].state.val !== 'number') {
supportsAggregates = false;
} else if (adapter._influxDPs[options.id][adapter.namespace].skipped && typeof adapter._influxDPs[options.id][adapter.namespace].skipped.val !== 'number') {
} else if (adapter._influxDPs[options.id] && adapter._influxDPs[options.id][adapter.namespace] && adapter._influxDPs[options.id][adapter.namespace].skipped && typeof adapter._influxDPs[options.id][adapter.namespace].skipped.val !== 'number') {
supportsAggregates = false;
}
}
Expand Down

0 comments on commit 6ed600c

Please sign in to comment.