Skip to content

Commit

Permalink
fixes visualization not working - reopen issue #66 #97
Browse files Browse the repository at this point in the history
  • Loading branch information
ciddi89 committed Dec 22, 2023
1 parent 96a9d87 commit 57b512c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,15 @@ class LogParser extends utils.Adapter {
await this.updateTodayYesterday();
// Initially get visualization selection state values
for (let i = 0; i < this.config.visTables; i++) {
await this.getStateAsync('visualization.table' + i + '.selection', async (err, state) => {
if (!err && state && !(await this.isLikeEmpty(state.val))) {
this.g_tableFilters[i] = state.val;
const selectionState = await this.getStateAsync('visualization.table' + i + '.selection');
const getSelectionState = async (/** @type {ioBroker.State | null | undefined} */ state) => {
if (state && !(await this.isLikeEmpty(state.val))) {
return state.val;
} else {
this.g_tableFilters[i] = '';
return '';
}
});
};
this.g_tableFilters[i] = await getSelectionState(selectionState);
}
});
});
Expand Down

0 comments on commit 57b512c

Please sign in to comment.