Change skipped node types to use a switch statement
This commit is contained in:
parent
8195e5109b
commit
8110de514e
@ -87,8 +87,10 @@ class TextSourceRange {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const skip = ['RT', 'SCRIPT', 'STYLE'];
|
switch (node.nodeName.toUpperCase()) {
|
||||||
if (skip.includes(node.nodeName.toUpperCase())) {
|
case 'RT':
|
||||||
|
case 'SCRIPT':
|
||||||
|
case 'STYLE':
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user