Skip to content

Commit

Permalink
fix: deal with from=0 or to=0 in xyXShift
Browse files Browse the repository at this point in the history
  • Loading branch information
lpatiny committed Nov 19, 2020
1 parent 19b1643 commit e0f8292
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/xy/xyXShift.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function xyXShift(data, range = {}, options = {}) {
},
} = options;
let { from, to } = range;
if (!from || !to) return;
if (from === undefined || to === undefined) return;

const fromIndex = xFindClosestIndex(data.x, from);
const toIndex = xFindClosestIndex(data.x, to);
Expand Down

0 comments on commit e0f8292

Please sign in to comment.