Skip to content

Commit e259def

Browse files
committed
Fix issue when style prop is not an expression
1 parent 3df604b commit e259def

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/rules/no-single-element-style-arrays.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ module.exports = {
3737
return {
3838
JSXAttribute(node) {
3939
if (node.name.name !== 'style') return;
40+
if (!node.value.expression) return;
4041
if (node.value.expression.type !== 'ArrayExpression') return;
4142
if (node.value.expression.elements.length === 1) {
4243
reportNode(node);

0 commit comments

Comments
 (0)