We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d7cc41f commit f33003cCopy full SHA for f33003c
lib/rules/jsx-fragments.js
@@ -170,7 +170,12 @@ module.exports = {
170
ImportDeclaration(node) {
171
if (node.source && node.source.value === 'react') {
172
node.specifiers.forEach((spec) => {
173
- if ('imported' in spec && spec.imported && 'name' in spec.imported && spec.imported.name === fragmentPragma) {
+ if (
174
+ 'imported' in spec
175
+ && spec.imported
176
+ && 'name' in spec.imported
177
+ && spec.imported.name === fragmentPragma
178
+ ) {
179
if (spec.local) {
180
fragmentNames.add(spec.local.name);
181
}
0 commit comments