Merge branch 'mealie-next' into fix/webhook-test-not-working

This commit is contained in:
Kuchenpirat 2025-07-28 10:02:36 +02:00 committed by GitHub
commit af8ddf28a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 6 deletions

View file

@ -81,7 +81,7 @@
</v-card>
<WakelockSwitch />
<RecipePageComments
v-if="!recipe.settings.disableComments && !isEditForm && !isCookMode"
v-if="!recipe.settings?.disableComments && !isEditForm && !isCookMode"
v-model="recipe"
class="px-1 my-4 d-print-none"
/>
@ -278,7 +278,7 @@ async function deleteRecipe() {
* View Preferences
*/
const landscape = computed(() => {
const preferLandscape = recipe.value.settings.landscapeView;
const preferLandscape = recipe.value.settings?.landscapeView;
const smallScreen = !$vuetify.display.smAndUp.value;
if (preferLandscape) {

View file

@ -26,10 +26,10 @@ export default defineComponent({
},
},
emits: ["update:modelValue"],
setup(_, { emit }) {
setup(props, { emit }) {
function parseEvent(event: any): object {
if (!event) {
return {};
return props.modelValue || {};
}
try {
if (event.json) {
@ -43,11 +43,14 @@ export default defineComponent({
}
}
catch {
return {};
return props.modelValue || {};
}
}
function onChange(event: any) {
emit("update:modelValue", parseEvent(event));
const parsed = parseEvent(event);
if (parsed !== props.modelValue) {
emit("update:modelValue", parsed);
}
}
return {
onChange,