Do not freeze app for wrong class in mentions (#8411)

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina 2025-04-01 08:40:29 +04:00 committed by GitHub
parent 4dc7044fb0
commit b104585c92
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -29,20 +29,20 @@
let doc: Doc | undefined = undefined
$: icon = _class !== undefined ? hierarchy.getClass(_class).icon : null
$: icon = _class !== undefined && hierarchy.hasClass(_class) ? hierarchy.getClass(_class).icon : null
$: if (_class != null && _id != null) {
$: if (_class != null && _id != null && hierarchy.hasClass(_class)) {
docQuery.query(_class, { _id }, (r) => {
doc = r.shift()
})
}
</script>
{#if !doc}
{#if !doc && title}
<span class="antiMention">
{#if icon}<Icon {icon} size="small" />{' '}{:else}@{/if}{title}
</span>
{:else}
{:else if doc}
<Component
is={view.component.ObjectMention}
showLoading={false}