Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange

### Fixed
* [`no-is-mounted`]: fix logic in method name check ([#3821][] @Mathias-S)
* [`jsx-no-literals`]: Avoid crashing on valueless boolean props ([#3823][] @reosarevok)

[#3823]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3823
[#3821]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3821

## [7.36.0] - 2024.09.12
Expand Down
4 changes: 2 additions & 2 deletions lib/rules/jsx-no-literals.js
Original file line number Diff line number Diff line change
Expand Up @@ -503,9 +503,9 @@ module.exports = {
},

JSXAttribute(node) {
const isLiteralString = node.value.type === 'Literal'
const isLiteralString = node.value && node.value.type === 'Literal'
&& typeof node.value.value === 'string';
const isStringLiteral = node.value.type === 'StringLiteral';
const isStringLiteral = node.value && node.value.type === 'StringLiteral';

if (isLiteralString || isStringLiteral) {
const resolvedConfig = getOverrideConfig(node) || config;
Expand Down