Skip to content

Commit 039bda5

Browse files
authored
Better strict mode support (#632)
1 parent a28e904 commit 039bda5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/DraggableCore.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ export default class DraggableCore extends React.Component<DraggableCoreProps, D
265265
// React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
266266
// the underlying DOM node ourselves. See the README for more information.
267267
findDOMNode(): ?HTMLElement {
268-
return this.props?.nodeRef?.current ?? ReactDOM.findDOMNode(this);
268+
return this.props?.nodeRef ? this.props?.nodeRef?.current : ReactDOM.findDOMNode(this);
269269
}
270270

271271
handleDragStart: EventHandler<MouseTouchEvent> = (e) => {

0 commit comments

Comments
 (0)