Browse Source

fix: ViewIcon null check

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/4744/head
mertmit 2 years ago
parent
commit
7c2c671a64
  1. 4
      packages/nc-gui/components/general/ViewIcon.vue

4
packages/nc-gui/components/general/ViewIcon.vue

@ -10,7 +10,7 @@ const props = defineProps<{
const viewMeta = toRef(props, 'meta') const viewMeta = toRef(props, 'meta')
</script> </script>
<template> <template v-if="viewMeta">
<IcIcon <IcIcon
v-if="viewMeta?.meta?.icon" v-if="viewMeta?.meta?.icon"
:data-testid="`nc-icon-${viewMeta?.meta?.icon}`" :data-testid="`nc-icon-${viewMeta?.meta?.icon}`"
@ -19,7 +19,7 @@ const viewMeta = toRef(props, 'meta')
/> />
<component <component
:is="viewIcons[viewMeta.type]?.icon" :is="viewIcons[viewMeta.type]?.icon"
v-else v-else-if="viewMeta?.type"
class="nc-view-icon group-hover" class="nc-view-icon group-hover"
:style="{ color: viewIcons[viewMeta.type]?.color }" :style="{ color: viewIcons[viewMeta.type]?.color }"
/> />

Loading…
Cancel
Save