We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44f6c9f commit ce74be1Copy full SHA for ce74be1
lib/rules/sort-prop-types.js
@@ -265,10 +265,11 @@ module.exports = {
265
return;
266
}
267
268
- if (node.arguments[0].properties) {
269
- checkSorted(node.arguments[0].properties);
270
- } else if (node.arguments[0].type === 'Identifier') {
271
- const variable = variableUtil.findVariableByName(context, node.arguments[0].name);
+ const firstArg = node.arguments[0];
+ if (firstArg.properties) {
+ checkSorted(firstArg.properties);
+ } else if (firstArg.type === 'Identifier') {
272
+ const variable = variableUtil.findVariableByName(context, firstArg.name);
273
if (variable && variable.properties) {
274
checkSorted(variable.properties);
275
0 commit comments