Skip to content

Commit 1a94daf

Browse files
authored
Use optional chaining for value check
1 parent c94205b commit 1a94daf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

predbat-table-card.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,7 @@ class PredbatTableCard extends HTMLElement {
12021202
'pv-column', 'import-export-column', 'car-column'];
12031203

12041204
const bothValues = ["Both", "Both-Idle", "Both-Chg", "Both-Dis", "Both-Dis-Snail"];
1205-
const isBothField = bothValues.includes(theItem.value);
1205+
const isBothField = bothValues.includes(theItem?.value);
12061206

12071207
// This var will be used to collect the different parts of the response and build at the end.
12081208
let cellResponseArray = [];

0 commit comments

Comments
 (0)