From 45091332eee74c9bdfab727b7dc08326e7867767 Mon Sep 17 00:00:00 2001 From: Bruno Dias Date: Mon, 18 Apr 2016 23:29:56 -0300 Subject: [PATCH] [fixed] moved sanitizeProps out of the render calls. (#162) fixes Error: Uncaught TypeError: Cannot delete property 'ref' of #. --- lib/components/Modal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/components/Modal.js b/lib/components/Modal.js index 0d1aba9b..5f409ff4 100644 --- a/lib/components/Modal.js +++ b/lib/components/Modal.js @@ -55,6 +55,7 @@ var Modal = React.createClass({ }, componentWillReceiveProps: function(newProps) { + sanitizeProps(newProps); this.renderPortal(newProps); }, @@ -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); },