chayns-api 2.2.0-beta.4 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -82,7 +82,7 @@ const loadComponent = (scope, module, url, skipCompatMode = false, preventSingle
|
|
|
82
82
|
});
|
|
83
83
|
const sharedReact = shareScopes['chayns-api'].react[_react.default.version];
|
|
84
84
|
const matchReactVersion = sharedReact && sharedReact.useIn.includes(scope) && ((_sharedReact$lib = sharedReact.lib) === null || _sharedReact$lib === void 0 ? void 0 : _sharedReact$lib.call(sharedReact)) === _react.default;
|
|
85
|
-
if (!matchReactVersion || (Module.default.version || 1) < 2) {
|
|
85
|
+
if (!matchReactVersion || Module.default.environment !== 'production' || (Module.default.version || 1) < 2) {
|
|
86
86
|
const OriginalCompatComponent = (Module.default.version || 1) < 2.1 ? Module.default.CompatComponent.render({}).type.prototype : Module.default.CompatComponent.prototype;
|
|
87
87
|
class CompatComponent extends _react.default.Component {
|
|
88
88
|
constructor(props) {
|
|
@@ -77,7 +77,7 @@ const loadComponent = function (scope, module, url) {
|
|
|
77
77
|
});
|
|
78
78
|
const sharedReact = shareScopes['chayns-api'].react[React.version];
|
|
79
79
|
const matchReactVersion = sharedReact && sharedReact.useIn.includes(scope) && ((_sharedReact$lib = sharedReact.lib) === null || _sharedReact$lib === void 0 ? void 0 : _sharedReact$lib.call(sharedReact)) === React;
|
|
80
|
-
if (!matchReactVersion || (Module.default.version || 1) < 2) {
|
|
80
|
+
if (!matchReactVersion || Module.default.environment !== 'production' || (Module.default.version || 1) < 2) {
|
|
81
81
|
const OriginalCompatComponent = (Module.default.version || 1) < 2.1 ? Module.default.CompatComponent.render({}).type.prototype : Module.default.CompatComponent.prototype;
|
|
82
82
|
class CompatComponent extends React.Component {
|
|
83
83
|
constructor(props) {
|