Skip to content

Commit

Permalink
chore(removeScripts): remove redundant regex pattern (#2045)
Browse files Browse the repository at this point in the history
  • Loading branch information
SethFalco authored Jul 2, 2024
1 parent b8f8d1c commit a59f47b
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 a59f47b

Please sign in to comment.