@makeswift/runtime 0.0.0-d8554fe → 0.0.0-e77889f

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.
@@ -33685,29 +33685,16 @@ function RuntimeProvider({
33685
33685
  }, [store, registerComponents]);
33686
33686
  React.useEffect(() => {
33687
33687
  const isInBuilder = window.parent !== window;
33688
- if (!isInBuilder)
33689
- return;
33690
- const initializePromise = initializeReactBuilderPreview();
33691
- return () => {
33692
- initializePromise.then((cleanUp) => {
33693
- cleanUp();
33694
- });
33695
- };
33696
- async function initializeReactBuilderPreview() {
33688
+ if (isInBuilder)
33689
+ setReactBuilderPreviewStore();
33690
+ async function setReactBuilderPreviewStore() {
33697
33691
  const ReactBuilderPreview = await Promise.resolve().then(function() {
33698
33692
  return require("./react-builder-preview.cjs.js");
33699
33693
  });
33700
- const store2 = await new Promise((resolve) => {
33701
- setStore((store3) => {
33702
- const nextStore = ReactBuilderPreview.configureStore({
33703
- preloadedState: store3.getState(),
33704
- client
33705
- });
33706
- resolve(nextStore);
33707
- return nextStore;
33708
- });
33709
- });
33710
- return store2.dispatch(ReactBuilderPreview.initialize());
33694
+ setStore((store2) => ReactBuilderPreview.configureStore({
33695
+ preloadedState: store2.getState(),
33696
+ client
33697
+ }));
33711
33698
  }
33712
33699
  }, [client]);
33713
33700
  React.useEffect(() => {