From 296030673dac40d0fbcea98010b2c92117fdba19 Mon Sep 17 00:00:00 2001 From: Olga Bulat Date: Wed, 10 May 2023 18:20:47 +0300 Subject: [PATCH] Add changes from code review --- frontend/src/components/VContentLink/VContentLink.vue | 1 - frontend/src/composables/use-component-name.ts | 2 +- frontend/src/composables/use-search-type.ts | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/VContentLink/VContentLink.vue b/frontend/src/components/VContentLink/VContentLink.vue index 3b37383aadc..600bc337eaf 100644 --- a/frontend/src/components/VContentLink/VContentLink.vue +++ b/frontend/src/components/VContentLink/VContentLink.vue @@ -38,7 +38,6 @@ import useSearchType from "~/composables/use-search-type" import VIcon from "~/components/VIcon/VIcon.vue" import VLink from "~/components/VLink.vue" -import VIcon from "~/components/VIcon/VIcon.vue" export default defineComponent({ name: "VContentLink", diff --git a/frontend/src/composables/use-component-name.ts b/frontend/src/composables/use-component-name.ts index 10e662a3094..391b6da6798 100644 --- a/frontend/src/composables/use-component-name.ts +++ b/frontend/src/composables/use-component-name.ts @@ -6,5 +6,5 @@ import { getCurrentInstance } from "vue" */ export const useComponentName = () => { const vm = getCurrentInstance() - return vm?.proxy.$options.name + return vm?.proxy.$options.name ?? "Unknown" } diff --git a/frontend/src/composables/use-search-type.ts b/frontend/src/composables/use-search-type.ts index 2780616e776..a91881d12fc 100644 --- a/frontend/src/composables/use-search-type.ts +++ b/frontend/src/composables/use-search-type.ts @@ -58,7 +58,7 @@ export default function useSearchType() { analytics.sendCustomEvent("CHANGE_CONTENT_TYPE", { previous: previousSearchType.value, next: searchType, - component: componentName ?? "Unknown", + component: componentName, }) useSearchStore().setSearchType(searchType) previousSearchType.value = searchType