File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
plugins/document-resources/src/components Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 20
20
21
21
import { ComponentType } from ' svelte'
22
22
23
- export let value: IconProps
23
+ export let value: IconProps | undefined
24
24
export let size: IconSize
25
25
export let iconWithEmoji: AnySvelteComponent | Asset | ComponentType | undefined = view .ids .IconWithEmoji
26
26
export let defaultIcon: AnySvelteComponent | Asset | ComponentType = document .icon .Document
27
27
</script >
28
28
29
29
<Icon
30
30
{size }
31
- icon ={value .icon === iconWithEmoji && iconWithEmoji ? IconWithEmoji : value .icon ?? defaultIcon }
32
- iconProps ={value .icon === iconWithEmoji && iconWithEmoji
33
- ? { icon: value .color }
31
+ icon ={value ? .icon === iconWithEmoji && iconWithEmoji ? IconWithEmoji : value ? .icon ?? defaultIcon }
32
+ iconProps ={value ? .icon === iconWithEmoji && iconWithEmoji
33
+ ? { icon: value ? .color }
34
34
: {
35
- fill: value .color !== undefined ? getPlatformColorDef (value .color , $themeStore .dark ).icon : ' currentColor'
35
+ fill: value ? .color !== undefined ? getPlatformColorDef (value ? .color , $themeStore .dark ).icon : ' currentColor'
36
36
}}
37
37
/>
You can’t perform that action at this time.
0 commit comments