Skip to content

Commit 9f5f96f

Browse files
committed
check if arguments list is greater than or equal to one
1 parent 18e237b commit 9f5f96f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rules/jsx-no-literals.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ module.exports = {
7070
config.allowedStrings = new Set(config.allowedStrings.map(trimIfString));
7171

7272
function defaultMessageId() {
73-
const ancestorIsJSXElement = arguments.length > 1 && arguments[0];
73+
const ancestorIsJSXElement = arguments.length >= 1 && arguments[0];
7474
if (config.noAttributeStrings && !ancestorIsJSXElement) {
7575
return 'noStringsInAttributes';
7676
}

0 commit comments

Comments
 (0)