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 297f12b commit 6e21688Copy full SHA for 6e21688
rules/req-charset-utf/index.js
@@ -8,7 +8,7 @@ module.exports = {
8
lint(node, rule_config, { report }) {
9
// eslint-disable-next-line camelcase
10
if (dom_utils.is_tag_node(node) && node.name === 'meta') {
11
- const hasUtf = node.attributes.some((attribute) => attribute.value.chars.toLowerCase() === 'utf-8');
+ const hasUtf = node.attributes.some((attribute) => attribute?.value?.chars.toLowerCase() === 'utf-8');
12
const hasCharset = node.attributes.some((attribute) => attribute.name.chars === 'charset');
13
14
if (hasCharset === true && hasUtf === false) {
0 commit comments