From d362c2a585fff1d7a6ea018330590d99bb3584de Mon Sep 17 00:00:00 2001 From: shedaniel Date: Sat, 9 Jul 2022 01:10:25 +0800 Subject: [PATCH] Fix compilation --- frontend/src/components/mappings/MappingsEntryBlock.vue | 6 +++--- frontend/src/components/mappings/MappingsFilterBlock.vue | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/mappings/MappingsEntryBlock.vue b/frontend/src/components/mappings/MappingsEntryBlock.vue index 263d6af..fa08bfb 100644 --- a/frontend/src/components/mappings/MappingsEntryBlock.vue +++ b/frontend/src/components/mappings/MappingsEntryBlock.vue @@ -139,7 +139,7 @@ function getBreadcrumbs(hasTranslation: boolean, entry: MappingEntry) { breadcrumbs.push(named) } } else { - let translatedTo = entry.translatedTo + let translatedTo = entry.translatedTo! let intermediary = getIntermediaryName(entry)! let named = getDisplayName(entry, false)! if (intermediary !== named && named) { @@ -224,8 +224,8 @@ export default defineComponent({ breadcrumbs() { return getBreadcrumbs(this.hasTranslation, this.entry) }, - hasTranslation() { - return this.entry.translatedTo && this.translatedToNamespace + hasTranslation(): boolean { + return this.entry.translatedTo !== undefined && this.translatedToNamespace !== undefined }, }, methods: { diff --git a/frontend/src/components/mappings/MappingsFilterBlock.vue b/frontend/src/components/mappings/MappingsFilterBlock.vue index 1c47b64..38bc9d2 100644 --- a/frontend/src/components/mappings/MappingsFilterBlock.vue +++ b/frontend/src/components/mappings/MappingsFilterBlock.vue @@ -86,7 +86,7 @@ export default defineComponent({ delocalizeNamespace(string: string) : Namespace { let id = Object.entries(namespaceLocalizations) .find(([id, name]) => name === string) - ?.[0] ?? this.namespace?.id + ?.[0] ?? this.namespace return this.namespaces.find(ns => ns.id === id) ?? (this.namespace ?? this.namespaces[0]) } },