Skip to content

Commit ddb7e67

Browse files
fix handle undefined type prop
1 parent 4c7e313 commit ddb7e67

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ function isObjectWithProperties(node) {
2323
// Default interface props don't need labels and descriptions
2424
function isDefaultInterfaceProperty(propertyName, properties) {
2525
if (propertyName === "label" || propertyName === "description") {
26-
const interfacePropValue = findPropertyWithName("type", properties).value;
27-
return (interfacePropValue.value === "$.interface.timer" || interfacePropValue.value === "$.interface.http");
26+
const interfacePropValue = findPropertyWithName("type", properties)?.value;
27+
return (interfacePropValue?.value === "$.interface.timer" || interfacePropValue?.value === "$.interface.http");
2828
}
2929
return false;
3030
}

0 commit comments

Comments
 (0)