Skip to content

Commit

Permalink
fix(plugin-mirror): Make mirror count attribute non-cloneable
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Fan committed Mar 17, 2024
1 parent 8bf86b6 commit eaf617c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/plugin-mirror/src/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ const mirrorGen = (start, end) => {
point.x = uNom / denom
point.y = vNom / denom

const mirrorCount = Number(point.attributes.get('data-mirrored'))
const mirrorCount = Number(point.attributes.get('data-mirrored-noclone'))
// some points returned by utils do not have logs
if (mirrorCount > 0 && point.log)
point.log.warn(
`Point ${point.name} was mirrored more than once (${
mirrorCount + 1
}) which can lead to hard to trace bugs`
)
point.attributes.set('data-mirrored', mirrorCount + 1)
point.attributes.set('data-mirrored-noclone', mirrorCount + 1)

return point
}
Expand Down

0 comments on commit eaf617c

Please sign in to comment.