make messing with recipe JSON more resilient

This commit is contained in:
Michael Genson 2025-07-27 01:46:19 +00:00
commit 049a93555e

View file

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