mirror of
https://github.com/intergalacticalvariable/reader.git
synced 2024-11-16 11:42:32 +08:00
fix
This commit is contained in:
parent
54fa5feb7f
commit
f4f189c8e6
|
@ -126,7 +126,10 @@ function getMaxDepthAndCountUsingTreeWalker(root) {
|
|||
const treeWalker = document.createTreeWalker(
|
||||
root,
|
||||
NodeFilter.SHOW_ELEMENT,
|
||||
(node) => (node.nodeName.toLowerCase() === 'svg' || node.nodeName.toLowerCase() === 'code') ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT,
|
||||
(node) => {
|
||||
const nodeName = node.nodeName.toLowerCase();
|
||||
return (nodeName === 'svg' || nodeName === 'code') ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
|
||||
},
|
||||
false
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user