Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix(settings): Adjust appstore types as releases are not always set
Signed-off-by: Ferdinand Thiessen <[email protected]>
  • Loading branch information
susnux committed Mar 18, 2024
commit 44e0223ef92c4760d3cb502a21893605487b06a4
2 changes: 1 addition & 1 deletion apps/settings/src/app-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ export interface IAppstoreApp {
isCompatible: boolean

appstoreData: Record<string, never>
releases: IAppstoreAppRelease[]
releases?: IAppstoreAppRelease[]
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import Markdown from '../Markdown.vue'
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const props = defineProps<{ app: IAppstoreApp }>()

const hasChangelog = computed(() => Object.values(props.app.releases[0]?.translations ?? {}).some(({ changelog }) => !!changelog))
const hasChangelog = computed(() => Object.values(props.app.releases?.[0]?.translations ?? {}).some(({ changelog }) => !!changelog))

const createChangelogFromRelease = (release: IAppstoreAppRelease) => release.translations?.[getLanguage()]?.changelog ?? release.translations?.en?.changelog ?? ''
</script>
Expand Down