diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2024-01-04 11:07:54 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2024-01-04 11:07:54 +0800 |
| commit | 275f9dc0bdf3e58aa36b800f55f8648fbc55d8af (patch) | |
| tree | 81c7cf120fb703cfd5e3162f2366033d9fe5c7f8 /node_modules/svgo/plugins/removeViewBox.js | |
| parent | 2b4ab36917baef56c7ce1602966f941be15af785 (diff) | |
upgrade
Diffstat (limited to 'node_modules/svgo/plugins/removeViewBox.js')
| -rw-r--r-- | node_modules/svgo/plugins/removeViewBox.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/node_modules/svgo/plugins/removeViewBox.js b/node_modules/svgo/plugins/removeViewBox.js index 5618d8bd..c0f23de2 100644 --- a/node_modules/svgo/plugins/removeViewBox.js +++ b/node_modules/svgo/plugins/removeViewBox.js @@ -3,7 +3,7 @@ exports.name = 'removeViewBox'; exports.description = 'removes viewBox attribute when possible'; -const viewBoxElems = ['svg', 'pattern', 'symbol']; +const viewBoxElems = new Set(['pattern', 'svg', 'symbol']); /** * Remove viewBox attr which coincides with a width/height box. @@ -24,7 +24,7 @@ exports.fn = () => { element: { enter: (node, parentNode) => { if ( - viewBoxElems.includes(node.name) && + viewBoxElems.has(node.name) && node.attributes.viewBox != null && node.attributes.width != null && node.attributes.height != null |
