@plasmicapp/react-web 0.2.227 → 0.2.229

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.
@@ -1371,12 +1371,13 @@ var PlasmicLink = React__default.forwardRef(function PlasmicLink(props, ref) {
1371
1371
  var _a;
1372
1372
  // The usePlasmicLinkMaybe function may be undefined, if host is not up-to-date
1373
1373
  var Link = (_a = usePlasmicLinkMaybe === null || usePlasmicLinkMaybe === void 0 ? void 0 : usePlasmicLinkMaybe()) !== null && _a !== void 0 ? _a : PlasmicLinkInternal;
1374
- if (Link === PlasmicLink) {
1374
+ if (Link === PlasmicLink || Link === PlasmicLinkInternal) {
1375
1375
  // Just in case, break the cycle
1376
1376
  return React__default.createElement(PlasmicLinkInternal, __assign({}, props, { ref: ref }));
1377
1377
  }
1378
1378
  else {
1379
- return React__default.createElement(Link, __assign({}, props, { ref: ref }));
1379
+ // Don't pass component/platform props to non-PlasmicLinkInternal
1380
+ return React__default.createElement(Link, __assign({}, omit(props, "component", "platform"), { ref: ref }));
1380
1381
  }
1381
1382
  });
1382
1383
  var PlasmicLinkInternal = React__default.forwardRef(function PlasmicLinkInternal(props, ref) {
@@ -1643,7 +1644,19 @@ function PlasmicRootProvider(props) {
1643
1644
  React.createElement(PlasmicDataSourceContextProvider, { value: dataSourceContextValue },
1644
1645
  React.createElement(PlasmicTranslatorContext.Provider, { value: (_a = props.i18n) !== null && _a !== void 0 ? _a : props.translator },
1645
1646
  React.createElement(PlasmicHeadContext.Provider, { value: props.Head },
1646
- React.createElement(PlasmicLinkProvider, { Link: (_b = props.Link) !== null && _b !== void 0 ? _b : PlasmicLinkInternal }, children))))))));
1647
+ React.createElement(SafePlasmicLinkProvider, { Link: (_b = props.Link) !== null && _b !== void 0 ? _b : PlasmicLinkInternal }, children))))))));
1648
+ }
1649
+ /**
1650
+ * A PlasmicLinkProvider that anticipates PlasmicLinkProvider may not exist yet from
1651
+ * @plasmicapp/host if the user is using an older version
1652
+ */
1653
+ function SafePlasmicLinkProvider(props) {
1654
+ if (PlasmicLinkProvider) {
1655
+ return React.createElement(PlasmicLinkProvider, __assign({}, props));
1656
+ }
1657
+ else {
1658
+ return React.createElement(React.Fragment, null, props.children);
1659
+ }
1647
1660
  }
1648
1661
  var useIsSSR = useIsSSR$1;
1649
1662
  function useHasPlasmicRoot() {