Skip to content

Commit

Permalink
chore(removeScripts): remove redundant regex pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
SethFalco committed Jul 2, 2024
1 parent b8f8d1c commit 0078dc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/removeScripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const fn = () => {

const index = parentNode.children.indexOf(node);
const usefulChildren = node.children.filter(
(child) => !(child.type === 'text' && /\s*/.test(child.value)),
(child) => child.type !== 'text',
);
parentNode.children.splice(index, 1, ...usefulChildren);

Expand Down

0 comments on commit 0078dc6

Please sign in to comment.