1
0
Fork 0

fix(plugin-dimension): Fix rmad, closes #2860

This commit is contained in:
Joost De Cock 2022-09-26 12:02:31 +02:00
parent bc8b742cb7
commit 35c9a877e2

View file

@ -145,12 +145,15 @@ export const plugin = {
}
},
// Remove all dimensions (with standard prefix)
rmad: function ({ prefix = '' }, { paths, points }) {
for (let id in points) {
if (id.slice(0, prefix.length) === prefix) delete points[id]
rmad: function (params, props) {
const toRemove = {
points: props.point,
paths: props.paths,
}
for (let type in toRemove) {
for (let id in props[type]) {
if (id.slice(0, prefix.length) === prefix) delete props[type][id]
}
for (let id in paths) {
if (id.slice(0, prefix.length) === prefix) delete paths[id]
}
},
},