chayns-api 2.6.0-beta.11 → 2.6.0-beta.12

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.
@@ -17,13 +17,14 @@ const System = ({
17
17
  }) => {
18
18
  const Component = (0, _react.useMemo)(() => (0, _loadComponent.default)(system.scope, system.module, globalThis.window ? system.url : system.serverUrl, undefined, system.preventSingleton), [system.scope, system.module, system.url, system.serverUrl, system.preventSingleton]);
19
19
  if (!globalThis.window) {
20
- var _system$scope, _moduleContext$_syste;
20
+ var _moduleContext$system;
21
21
  const moduleContext = (0, _react.useContext)(_moduleContext.ModuleContext);
22
- (_moduleContext$_syste = moduleContext[_system$scope = system.scope]) !== null && _moduleContext$_syste !== void 0 ? _moduleContext$_syste : moduleContext[_system$scope] = {
22
+ const info = (_moduleContext$system = moduleContext[system.scope]) !== null && _moduleContext$system !== void 0 ? _moduleContext$system : {
23
23
  url: system.url,
24
24
  modules: new Set()
25
25
  };
26
- moduleContext[system.scope].modules.add(system.module);
26
+ info.modules.add(system.module);
27
+ moduleContext[system.scope] = info;
27
28
  }
28
29
  return _react.default.createElement(_react.default.Suspense, {
29
30
  fallback: fallback || ''
@@ -9,13 +9,14 @@ const System = ({
9
9
  }) => {
10
10
  const Component = useMemo(() => loadComponent(system.scope, system.module, globalThis.window ? system.url : system.serverUrl, undefined, system.preventSingleton), [system.scope, system.module, system.url, system.serverUrl, system.preventSingleton]);
11
11
  if (!globalThis.window) {
12
- var _system$scope, _moduleContext$_syste;
12
+ var _moduleContext$system;
13
13
  const moduleContext = useContext(ModuleContext);
14
- (_moduleContext$_syste = moduleContext[_system$scope = system.scope]) !== null && _moduleContext$_syste !== void 0 ? _moduleContext$_syste : moduleContext[_system$scope] = {
14
+ const info = (_moduleContext$system = moduleContext[system.scope]) !== null && _moduleContext$system !== void 0 ? _moduleContext$system : {
15
15
  url: system.url,
16
16
  modules: new Set()
17
17
  };
18
- moduleContext[system.scope].modules.add(system.module);
18
+ info.modules.add(system.module);
19
+ moduleContext[system.scope] = info;
19
20
  }
20
21
  return React.createElement(React.Suspense, {
21
22
  fallback: fallback || ''
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chayns-api",
3
- "version": "2.6.0-beta.11",
3
+ "version": "2.6.0-beta.12",
4
4
  "description": "new chayns api",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",