Utilize ?. operator and set TypeScript target

This commit is contained in:
Zaid Abdulla committed 2021-09-16 13:27:37 -07:00
1 parent ca83704958
commit c3c7ab72b2
19 files changed
+55 -77

No files matched your search

+1 -1
View File
@@ -85,7 +85,7 @@ const component: ClosureComponent = (): Component => {
let c = 0;
for (const k of keys) {
const p = device[k];
const str = p.value && p.value[0] ? `${k} ${p.value[0]}` : k;
const str = p.value?.[0] ? `${k} ${p.value[0]}` : k;
if (re && !re.test(str)) continue;
++c;
if (count < limit) filteredKeys.push(k);