Skip to content

Commit 4509133

Browse files
diasbrunoclaydiffrient
authored andcommittedApr 19, 2016
[fixed] moved sanitizeProps out of the render calls. (#162)
fixes Error: Uncaught TypeError: Cannot delete property 'ref' of #<Object>.
1 parent 25c1dad commit 4509133

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

Diff for: ‎lib/components/Modal.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ var Modal = React.createClass({
5555
},
5656

5757
componentWillReceiveProps: function(newProps) {
58+
sanitizeProps(newProps);
5859
this.renderPortal(newProps);
5960
},
6061

@@ -75,7 +76,6 @@ var Modal = React.createClass({
7576
ariaAppHider.toggle(props.isOpen, props.appElement);
7677
}
7778

78-
sanitizeProps(props);
7979
this.portal = renderSubtreeIntoContainer(this, ModalPortal(Assign({}, props, {defaultStyles: Modal.defaultStyles})), this.node);
8080
},
8181

0 commit comments

Comments
 (0)
Please sign in to comment.