fix(core): check if node el exists before observing
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -94,7 +94,7 @@ onUpdateNodeInternals((updateIds) => {
|
|||||||
|
|
||||||
watchEffect(
|
watchEffect(
|
||||||
(onCleanup) => {
|
(onCleanup) => {
|
||||||
if (!node.hidden) {
|
if (!node.hidden && nodeElement.value) {
|
||||||
props.resizeObserver.observe(nodeElement.value as HTMLDivElement)
|
props.resizeObserver.observe(nodeElement.value as HTMLDivElement)
|
||||||
|
|
||||||
onCleanup(() => props.resizeObserver.unobserve(nodeElement.value as HTMLDivElement))
|
onCleanup(() => props.resizeObserver.unobserve(nodeElement.value as HTMLDivElement))
|
||||||
|
|||||||
Reference in New Issue
Block a user