Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
emargareten committed Nov 8, 2023
1 parent d127bd0 commit 97fe872
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions dist/inertia-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ watch(modal, resolveComponent, {
immediate: true,
});

const redirect = () => {
/**
* @param {import('@inertiajs/core').VisitOptions} options
*/
const redirect = (options = {}) => {
const redirectURL = modal.value?.redirectURL;

vnode.value = false;
Expand All @@ -94,10 +97,7 @@ const redirect = () => {
return
}

return router.visit(redirectURL, {
preserveScroll: true,
preserveState: true,
})
return router.visit(redirectURL, options)
};

const useModal = () => {
Expand Down
10 changes: 5 additions & 5 deletions dist/inertia-modal.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@
immediate: true,
});

const redirect = () => {
/**
* @param {import('@inertiajs/core').VisitOptions} options
*/
const redirect = (options = {}) => {
const redirectURL = modal.value?.redirectURL;

vnode.value = false;
Expand All @@ -96,10 +99,7 @@
return
}

return vue3.router.visit(redirectURL, {
preserveScroll: true,
preserveState: true,
})
return vue3.router.visit(redirectURL, options)
};

const useModal = () => {
Expand Down

0 comments on commit 97fe872

Please sign in to comment.