@blocklet/pages-kit 0.6.32 → 0.6.34

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.
@@ -331,14 +331,13 @@ function usePreloadComponent({ instanceId, componentId, properties, locale, dev
331
331
  if (instanceId) {
332
332
  const key = [instanceId, realLocale].join('-');
333
333
  const componentState = (0, exports.customComponentStates)().getState();
334
- COMPONENT_LOADER_MAP[key] ??=
335
- Promise.resolve(componentState.getComponent({ componentId, locale: realLocale ?? dev?.defaultLocale ?? 'en' })) ??
336
- componentState.loadComponents({
337
- mode: dev?.mode,
338
- projectId: dev?.projectId ?? window.__PROJECT_ID__,
339
- locale: realLocale,
340
- instances: [{ id: instanceId, component: { id: componentId }, properties }],
341
- });
334
+ COMPONENT_LOADER_MAP[key] ??= Promise.resolve(componentState.getComponent({ componentId, locale: realLocale ?? dev?.defaultLocale ?? 'en' }) ??
335
+ componentState.loadComponents({
336
+ mode: dev?.mode,
337
+ projectId: dev?.projectId ?? window.__PROJECT_ID__,
338
+ locale: realLocale,
339
+ instances: [{ id: instanceId, component: { id: componentId }, properties }],
340
+ }));
342
341
  }
343
342
  // 如果前置 preload 已经触发过了,直接返回,不再触发下面的 /preload 逻辑
344
343
  if (previousRef.current) {