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 490f90c commit b356076Copy full SHA for b356076
lib/rules/sort-prop-types.js
@@ -262,10 +262,11 @@ module.exports = {
262
return;
263
}
264
265
- if (node.arguments[0].properties) {
266
- checkSorted(node.arguments[0].properties);
267
- } else if (node.arguments[0].type === 'Identifier') {
268
- 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') {
269
+ const variable = variableUtil.findVariableByName(context, firstArg.name);
270
if (variable && variable.properties) {
271
checkSorted(variable.properties);
272
0 commit comments