adds rangeStart undefined check
This commit is contained in:
parent
24c3551b5c
commit
6516246499
|
@ -310,7 +310,7 @@ const PhotoFrame = ({
|
|||
};
|
||||
|
||||
const handleRangeSelect = (index: number) => () => {
|
||||
if (rangeStart !== index) {
|
||||
if (typeof rangeStart !== 'undefined' && rangeStart !== index) {
|
||||
const direction =
|
||||
(index - rangeStart) / Math.abs(index - rangeStart);
|
||||
let checked = true;
|
||||
|
|
Loading…
Reference in a new issue