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 336ff2f commit 1580a6bCopy full SHA for 1580a6b
lib/rules/sort-prop-types.js
@@ -257,10 +257,11 @@ module.exports = {
257
return;
258
}
259
260
- if (node.arguments[0].properties) {
261
- checkSorted(node.arguments[0].properties);
262
- } else if (node.arguments[0].type === 'Identifier') {
263
- 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') {
264
+ const variable = variableUtil.findVariableByName(context, firstArg.name);
265
if (variable && variable.properties) {
266
checkSorted(variable.properties);
267
0 commit comments