Skip to content

Commit

Permalink
refactor(structured-dlitems-evaluate): work with virtual nodes (#2493)
Browse files Browse the repository at this point in the history
* refactor(structured-dlitems-evaluate): work with virtual nodes

* refactor(structured-dlitems-evaluate): update var
  • Loading branch information
Xiaoyi Chen authored Aug 28, 2020
1 parent 782c0fd commit 68d9be5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/checks/lists/structured-dlitems-evaluate.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
function structuredDlitemsEvaluate(node, options, virtualNode) {
var children = virtualNode.children;
const children = virtualNode.children;
if (!children || !children.length) {
return false;
}

var hasDt = false,
let hasDt = false,
hasDd = false,
nodeName;
for (var i = 0; i < children.length; i++) {
nodeName = children[i].actualNode.nodeName.toUpperCase();
nodeName = children[i].props.nodeName.toUpperCase();
if (nodeName === 'DT') {
hasDt = true;
}
Expand Down

0 comments on commit 68d9be5

Please sign in to comment.