mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-24 17:30:03 +00:00
Add "isEmpty" prop to "MessageViewer" (#2613)
Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@xored.com>
This commit is contained in:
parent
44f5ba1c64
commit
3c5f67df62
@ -22,7 +22,12 @@
|
||||
|
||||
const parser = new DOMParser()
|
||||
|
||||
$: dom = parser.parseFromString(message, 'text/html').firstChild?.childNodes[1] as HTMLElement
|
||||
export function isEmpty () {
|
||||
return doc.documentElement.innerText.length === 0
|
||||
}
|
||||
|
||||
$: doc = parser.parseFromString(message, 'text/html')
|
||||
$: dom = doc.firstChild?.childNodes[1] as HTMLElement
|
||||
</script>
|
||||
|
||||
<Nodes nodes={dom.childNodes} />
|
||||
|
Loading…
Reference in New Issue
Block a user