Skip to content

Commit c226e71

Browse files
overwrite history to avoid duplicating recipe imports (#2820)
Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
1 parent c6263a3 commit c226e71

File tree

1 file changed

+5
-1
lines changed
  • frontend/pages/g/_groupSlug/r/create

1 file changed

+5
-1
lines changed

frontend/pages/g/_groupSlug/r/create/url.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,11 @@ export default defineComponent({
103103
if (refreshTags) {
104104
tags.actions.refresh();
105105
}
106-
router.push(`/g/${groupSlug.value}/r/${response.data}?edit=${edit.toString()}`);
106+
107+
// we clear the query params first so if the user hits back, they don't re-import the recipe
108+
router.replace({ query: {} }).then(
109+
() => router.push(`/g/${groupSlug.value}/r/${response.data}?edit=${edit.toString()}`)
110+
);
107111
}
108112
109113
const recipeUrl = computed({

0 commit comments

Comments
 (0)