diff --git a/src/isomorphic/classic/element/ReactElement.js b/src/isomorphic/classic/element/ReactElement.js index 39db3d2a6b755..bad91e5030c5c 100644 --- a/src/isomorphic/classic/element/ReactElement.js +++ b/src/isomorphic/classic/element/ReactElement.js @@ -109,8 +109,10 @@ var ReactElement = function(type, key, ref, self, source, owner, props) { element._self = self; element._source = source; } - Object.freeze(element.props); - Object.freeze(element); + if (Object.freeze) { + Object.freeze(element.props); + Object.freeze(element); + } } return element; diff --git a/src/renderers/dom/ReactDOM.js b/src/renderers/dom/ReactDOM.js index f8e030c8446af..f9c8e7f76dd76 100644 --- a/src/renderers/dom/ReactDOM.js +++ b/src/renderers/dom/ReactDOM.js @@ -98,16 +98,12 @@ if (__DEV__) { Object.keys, String.prototype.split, String.prototype.trim, - - // shams - Object.create, - Object.freeze, ]; for (var i = 0; i < expectedFeatures.length; i++) { if (!expectedFeatures[i]) { console.error( - 'One or more ES5 shim/shams expected by React are not available: ' + + 'One or more ES5 shims expected by React are not available: ' + 'https://fb.me/react-warning-polyfills' ); break; diff --git a/src/renderers/dom/client/syntheticEvents/SyntheticEvent.js b/src/renderers/dom/client/syntheticEvents/SyntheticEvent.js index 71d018004bd03..ac111803e0686 100644 --- a/src/renderers/dom/client/syntheticEvents/SyntheticEvent.js +++ b/src/renderers/dom/client/syntheticEvents/SyntheticEvent.js @@ -175,7 +175,10 @@ SyntheticEvent.Interface = EventInterface; SyntheticEvent.augmentClass = function(Class, Interface) { var Super = this; - var prototype = Object.create(Super.prototype); + var E = function () {}; + E.prototype = Super.prototype; + var prototype = new E(); + assign(prototype, Class.prototype); Class.prototype = prototype; Class.prototype.constructor = Class;