Skip to content

Commit dad2b84

Browse files
wakelessdeecewan
andauthored
Replace the whole expression rather than the whole node
Co-Authored-By: David Buchan-Swanson <[email protected]>
1 parent 8a4b5ad commit dad2b84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module.exports = {
2626
fix(fixer) {
2727
const realStyleNode = JSXExpressionNode.value.expression.elements[0];
2828
const styleSource = context.getSourceCode().getText(realStyleNode);
29-
return fixer.replaceText(JSXExpressionNode.value, `{${styleSource}}`);
29+
return fixer.replaceText(JSXExpressionNode.value.expression, styleSource);
3030
},
3131
});
3232
}

0 commit comments

Comments
 (0)