Skip to content

Commit

Permalink
dumili: Fix error when fetching story details
Browse files Browse the repository at this point in the history
  • Loading branch information
bperel committed Jan 25, 2025
1 parent 6c97dc4 commit 9ecdaaa
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions apps/dumili/src/components/suggestions/StorySuggestionList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@
size="sm"
@click="
indexation.entries[entryIdx].entirepages =
getStorycodePageCount(suggestion.storycode)
getStorycodePageCount(suggestion.storycode)!
"
>{{
$t(
getStorycodePageCount(suggestion.storycode) >
getStorycodePageCount(suggestion.storycode)! >
indexation.entries[entryIdx].entirepages
? "Étendre cette entrée à {originalPagesCount} page|Étendre cette entrée à {originalPagesCount} pages"
: "Réduire cette entrée à {originalPagesCount} page|Réduire cette entrée à {originalPagesCount} pages",
Expand All @@ -89,7 +89,7 @@
suggestion.storycode,
),
},
getStorycodePageCount(suggestion.storycode),
getStorycodePageCount(suggestion.storycode)!,
)
}}</b-button
></b-popover
Expand Down Expand Up @@ -144,9 +144,11 @@ const entryIdx = computed(() =>
);
const getStorycodePageCount = (storycode: string) =>
storyversionDetails.value[
storyDetails.value[storycode].originalstoryversioncode!
].entirepages!;
(storyDetails.value[storycode].originalstoryversioncode &&
storyversionDetails.value[
storyDetails.value[storycode].originalstoryversioncode
]?.entirepages) ||
null;
const acceptStory = async (storycode: storySuggestion["storycode"] | null) => {
let storySuggestion: Pick<storySuggestion, "id" | "storycode"> | undefined =
Expand Down

0 comments on commit 9ecdaaa

Please sign in to comment.