summaryrefslogtreecommitdiff
path: root/node_modules/svgo/plugins/removeUselessStrokeAndFill.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/svgo/plugins/removeUselessStrokeAndFill.js')
-rw-r--r--node_modules/svgo/plugins/removeUselessStrokeAndFill.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/node_modules/svgo/plugins/removeUselessStrokeAndFill.js b/node_modules/svgo/plugins/removeUselessStrokeAndFill.js
index 1dff61cc..f5f99855 100644
--- a/node_modules/svgo/plugins/removeUselessStrokeAndFill.js
+++ b/node_modules/svgo/plugins/removeUselessStrokeAndFill.js
@@ -2,6 +2,7 @@
const { visit, visitSkip, detachNodeFromParent } = require('../lib/xast.js');
const { collectStylesheet, computeStyle } = require('../lib/style.js');
+const { hasScripts } = require('../lib/svgo/tools.js');
const { elemsGroups } = require('./_collections.js');
exports.name = 'removeUselessStrokeAndFill';
@@ -26,7 +27,7 @@ exports.fn = (root, params) => {
visit(root, {
element: {
enter: (node) => {
- if (node.name === 'style' || node.name === 'script') {
+ if (node.name === 'style' || hasScripts(node)) {
hasStyleOrScript = true;
}
},