@inertiaui/modal-react 3.0.0 → 3.0.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.
@@ -279,7 +279,7 @@
279
279
  const savedBaseUrl = baseUrl;
280
280
  baseUrl = null;
281
281
  closingToBaseUrlTarget = savedBaseUrl;
282
- if (savedBaseUrl && typeof window !== "undefined") {
282
+ if (savedBaseUrl && typeof window !== "undefined" && !vanilla.sameUrlPath(savedBaseUrl, window.location.href)) {
283
283
  react.router.push({
284
284
  url: savedBaseUrl,
285
285
  preserveScroll: true,
@@ -773,7 +773,7 @@
773
773
  }, [modalContext]);
774
774
  const previousIsOpenRef = React.useRef(void 0);
775
775
  React.useEffect(() => {
776
- if (modalContext !== null) {
776
+ if (modalContext != null) {
777
777
  if (modalContext.isOpen) {
778
778
  onSuccess?.();
779
779
  } else if (previousIsOpenRef.current === true) {
@@ -784,7 +784,7 @@
784
784
  }, [modalContext?.isOpen]);
785
785
  const [rendered, setRendered] = React.useState(false);
786
786
  React.useEffect(() => {
787
- if (rendered && modalContext !== null && modalContext.isOpen) {
787
+ if (rendered && modalContext != null && modalContext.isOpen) {
788
788
  if (modalContext.onTopOfStack) {
789
789
  onFocus?.();
790
790
  } else {