Skip to content

Commit

Permalink
(fix) allow mirroring around origin
Browse files Browse the repository at this point in the history
  • Loading branch information
torik42 authored and mrzealot committed Dec 3, 2022
1 parent 1da986e commit 17dc5ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/points.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ exports.parse = (config, units) => {

// per-zone mirroring for the new keys
const axis = parse_axis(mirror, `points.zones.${zone_name}.mirror`, points, units)
if (axis) {
if (axis !== undefined) {
const mirrored_points = {}
for (const new_point of Object.values(new_points)) {
const [mname, mp] = perform_mirror(new_point, axis)
Expand All @@ -352,7 +352,7 @@ exports.parse = (config, units) => {
const global_axis = parse_axis(global_mirror, `points.mirror`, points, units)
const global_mirrored_points = {}
for (const point of Object.values(points)) {
if (global_axis && point.mirrored === undefined) {
if (global_axis !== undefined && point.mirrored === undefined) {
const [mname, mp] = perform_mirror(point, global_axis)
if (mp) {
global_mirrored_points[mname] = mp
Expand Down

0 comments on commit 17dc5ab

Please sign in to comment.