We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2acd51 commit 1df69a1Copy full SHA for 1df69a1
lib/component.js
@@ -42,10 +42,10 @@ function Component(props, context) {
42
43
Component.prototype = Object.create(React.Component.prototype);
44
45
-if ('__proto__' in {}) {
46
- Component.__proto__ = React.Component;
47
-} else if (typeof Object.setPrototypeOf === 'function') {
+if (typeof Object.setPrototypeOf === 'function') {
48
Object.setPrototypeOf(Component, React.Component);
+} else if (Object.__proto__) {
+ Component.__proto__ = React.Component;
49
} else {
50
assign(Component, React.Component);
51
}
0 commit comments