Skip to content

Commit 084ddb1

Browse files
committed
Restore base URL to null after closing all modals
1 parent 72c8218 commit 084ddb1

File tree

6 files changed

+71
-69
lines changed

6 files changed

+71
-69
lines changed

react/dist/inertiaui-modal.js

Lines changed: 64 additions & 64 deletions
Large diffs are not rendered by default.

react/dist/inertiaui-modal.umd.cjs

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

react/src/ModalRoot.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,7 @@ export const ModalRoot = ({ children }) => {
492492

493493
if (!modalOnBase) {
494494
previousModalOnBase && context.closeAll()
495+
baseUrl = null
495496
return
496497
}
497498

vue/dist/inertiaui-modal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ const Je = {
123123
ne.on("navigate", (r) => {
124124
const i = r.detail.page.props._inertiaui_modal;
125125
if (!i) {
126-
o.value && t.closeAll();
126+
o.value && t.closeAll(), t.setBaseUrl(null);
127127
return;
128128
}
129129
o.value = i, t.setBaseUrl(i.baseUrl), t.pushFromResponseData(i, {}, () => {

vue/dist/inertiaui-modal.umd.cjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

vue/src/ModalRoot.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ onUnmounted(
1919
2020
if (!modalOnBase) {
2121
previousModalOnBase.value && modalStack.closeAll()
22+
modalStack.setBaseUrl(null)
2223
return
2324
}
2425

0 commit comments

Comments
 (0)