Fix clear url action in recipe creation (#1101)

This commit is contained in:
Miroito 2022-03-28 17:32:26 +02:00 committed by GitHub
parent 1e90dc2022
commit 5e44d1c238
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -394,9 +394,11 @@ export default defineComponent({
});
const recipeUrl = computed({
set(recipe_import_url: string) {
recipe_import_url = recipe_import_url.trim();
router.replace({ query: { ...route.value.query, recipe_import_url } });
set(recipe_import_url: string | null) {
if (recipe_import_url !== null) {
recipe_import_url = recipe_import_url.trim();
router.replace({ query: { ...route.value.query, recipe_import_url } });
}
},
get() {
return route.value.query.recipe_import_url as string;