Skip to content

Commit 572dde6

Browse files
authored
Create a writable redirectUrl
1 parent fc9d493 commit 572dde6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

resources/js/components/GraphqlMutation.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export default {
7878
initialVariables: {},
7979
data: {},
8080
mutate: () => null,
81+
redirectUrl: this.redirect,
8182
}),
8283
8384
render() {
@@ -202,11 +203,11 @@ export default {
202203
self.mutated = false
203204
}, 2500)
204205
205-
if (!this.redirect && this.notify.message) {
206+
if (!this.redirectUrl && this.notify.message) {
206207
Notify(this.notify.message, this.notify.type ?? 'success')
207208
}
208209
209-
if (this.redirect) {
210+
if (this.redirectUrl) {
210211
if (this.notify.message) {
211212
document.addEventListener(
212213
'vue:loaded',
@@ -216,7 +217,7 @@ export default {
216217
{ once: true },
217218
)
218219
}
219-
Turbo.visit(window.url(this.redirect))
220+
Turbo.visit(window.url(this.redirectUrl))
220221
}
221222
222223
return response

0 commit comments

Comments
 (0)