Skip to content

Commit 2e316f8

Browse files
committed
Revert "refactor: improve if statement"
This reverts commit 8b825e5.
1 parent 8b825e5 commit 2e316f8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/rules/no-use-computed-property-like-method.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ const getComponentPropsType = (property) => {
3737

3838
if (propsTypeProperty === undefined) return null
3939

40-
if (propsTypeProperty.value.type === 'Identifier')
40+
if (
41+
propsTypeProperty.type === 'Property' &&
42+
propsTypeProperty.value.type === 'Identifier'
43+
)
4144
return propsTypeProperty.value.name
4245
}
4346
return null

0 commit comments

Comments
 (0)