process undefined (#3458)

Signed-off-by: Ruslan Bayandinov <wazsone@ya.ru>
This commit is contained in:
Ruslan Bayandinov 2023-06-26 12:33:12 +04:00 committed by GitHub
parent 66275fd344
commit 6f25c8e529
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 32 deletions

View File

@ -20,7 +20,7 @@
import { createEventDispatcher, onMount } from 'svelte' import { createEventDispatcher, onMount } from 'svelte'
import tracker from '../../plugin' import tracker from '../../plugin'
export let value: WithLookup<Milestone> export let value: WithLookup<Milestone> | undefined
export let shouldShowAvatar = true export let shouldShowAvatar = true
export let disabled = false export let disabled = false
export let inline = false export let inline = false
@ -39,7 +39,8 @@
}) })
</script> </script>
<DocNavLink object={value} {disabled} {inline} {accent} noUnderline={disabled} {onClick}> {#if value}
<DocNavLink object={value} {disabled} {inline} {accent} noUnderline={disabled} {onClick}>
<div class="flex-presenter" class:inline-presenter={inline}> <div class="flex-presenter" class:inline-presenter={inline}>
{#if !inline && shouldShowAvatar} {#if !inline && shouldShowAvatar}
<div class="icon"> <div class="icon">
@ -50,4 +51,5 @@
{value.label} {value.label}
</span> </span>
</div> </div>
</DocNavLink> </DocNavLink>
{/if}

View File

@ -17,12 +17,13 @@
import { Icon, IconWithEmojii, getPlatformColorDef, getPlatformColorForTextDef, themeStore } from '@hcengineering/ui' import { Icon, IconWithEmojii, getPlatformColorDef, getPlatformColorForTextDef, themeStore } from '@hcengineering/ui'
import tracker from '../../plugin' import tracker from '../../plugin'
export let value: Project export let value: Project | undefined
export let inline: boolean = false export let inline: boolean = false
export let accent: boolean = false export let accent: boolean = false
</script> </script>
<div class="flex-presenter cursor-default" class:inline-presenter={inline}> {#if value}
<div class="flex-presenter cursor-default" class:inline-presenter={inline}>
<div class="icon" class:emoji={value.icon === tracker.component.IconWithEmojii}> <div class="icon" class:emoji={value.icon === tracker.component.IconWithEmojii}>
<Icon <Icon
icon={value.icon === tracker.component.IconWithEmojii ? IconWithEmojii : value.icon ?? tracker.icon.Home} icon={value.icon === tracker.component.IconWithEmojii ? IconWithEmojii : value.icon ?? tracker.icon.Home}
@ -40,4 +41,5 @@
<span class="label no-underline nowrap" class:fs-bold={accent}> <span class="label no-underline nowrap" class:fs-bold={accent}>
{value.name} {value.name}
</span> </span>
</div> </div>
{/if}