Utilize ?. operator and set TypeScript target
This commit is contained in:
1 parent
ca83704958
commit
c3c7ab72b2
19 files changed
+55
-77
No files matched your search
+1
-1
@@ -145,7 +145,7 @@ function queryTag(tag: string): Expression {
|
||||
|
||||
export function getTip(resource: string, label: string): string {
|
||||
let tip;
|
||||
if (resources[resource] && resources[resource][label]) {
|
||||
if (resources[resource]?.[label]) {
|
||||
const param = resources[resource][label];
|
||||
const types =
|
||||
resource === "devices" ? param["type"] : param["type"].split(",");
|
||||
|
||||
Reference in new issue
Block a user