Skip to content

Commit 974a896

Browse files
committed
Short circuit if no bounds are provided.
1 parent e17a9e8 commit 974a896

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/utils/positionFns.es6

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import React from 'react';
33
import {innerWidth, innerHeight, outerWidth, outerHeight} from './domFns';
44

55
export function getBoundPosition(draggable, clientX, clientY) {
6+
// If no bounds, short-circuit and move on
7+
if (!draggable.props.bounds) return [clientX, clientY];
8+
69
let bounds = JSON.parse(JSON.stringify(draggable.props.bounds));
710
let node = React.findDOMNode(draggable);
811
let parent = node.parentNode;

0 commit comments

Comments
 (0)