Skip to content

Commit 4509133

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

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/components/Modal.js

Lines changed: 1 addition & 1 deletion
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)