Skip to content

Commit

Permalink
check if arguments list is greater than or equal to one
Browse files Browse the repository at this point in the history
  • Loading branch information
TildaDares committed Jul 2, 2022
1 parent 18e237b commit 9f5f96f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rules/jsx-no-literals.js
Expand Up @@ -70,7 +70,7 @@ module.exports = {
config.allowedStrings = new Set(config.allowedStrings.map(trimIfString));

function defaultMessageId() {
const ancestorIsJSXElement = arguments.length > 1 && arguments[0];
const ancestorIsJSXElement = arguments.length >= 1 && arguments[0];
if (config.noAttributeStrings && !ancestorIsJSXElement) {
return 'noStringsInAttributes';
}
Expand Down

0 comments on commit 9f5f96f

Please sign in to comment.