Skip to content

Commit f6670f6

Browse files
committed
Fix bounds clone on string input
1 parent d778985 commit f6670f6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/utils/positionFns.es6

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ export function getBoundPosition(draggable: Draggable, clientX: number, clientY:
1717
if (!draggable.props.bounds) return [clientX, clientY];
1818

1919
// Clone new bounds
20-
let bounds = cloneBounds(draggable.props.bounds);
20+
let {bounds} = draggable.props;
21+
bounds = typeof bounds === 'string' ? bounds : cloneBounds(bounds);
2122
let node = ReactDOM.findDOMNode(draggable);
2223

2324
if (typeof bounds === 'string') {

0 commit comments

Comments
 (0)