Skip to content

Commit 9e1bd45

Browse files
committed
Replace optional chaining with conditional
1 parent 05b9837 commit 9e1bd45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/get-jsx-opening-element-attribute.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
function getJSXOpeningElementAttribute(openingEl, name) {
22
const attributes = openingEl.attributes
33
const attribute = attributes.find(attribute => {
4-
return attribute.name?.name === name
4+
return attribute.name && attribute.name.name === name
55
})
66

77
return attribute

0 commit comments

Comments
 (0)