Skip to content

Commit

Permalink
[fixed] moved sanitizeProps out of the render calls. (reactjs#162)
Browse files Browse the repository at this point in the history
fixes Error: Uncaught TypeError: Cannot delete property 'ref' of #<Object>.
  • Loading branch information
diasbruno authored and claydiffrient committed Apr 19, 2016
1 parent 25c1dad commit 4509133
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/components/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ var Modal = React.createClass({
},

componentWillReceiveProps: function(newProps) {
sanitizeProps(newProps);
this.renderPortal(newProps);
},

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

sanitizeProps(props);
this.portal = renderSubtreeIntoContainer(this, ModalPortal(Assign({}, props, {defaultStyles: Modal.defaultStyles})), this.node);
},

Expand Down

0 comments on commit 4509133

Please sign in to comment.