Skip to content

Commit 736378e

Browse files
committed
fix: Failed to execute 'observe' on '_ConnectionObserver': parameter 1 is not of type 'Node' or a DOMString.
1 parent c586054 commit 736378e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/widget.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class ReactWidgetImpl<
7272
if (this.root === undefined || this.containerElement === undefined) {
7373
this.containerElement = document.createElement('div');
7474
this.root = ReactDom.createRoot(this.containerElement);
75-
this.connectionObserver.observe(this.parentDomNode);
75+
this.connectionObserver?.observe?.(this.parentDomNode ?? this.containerElement);
7676
}
7777
this.domNodes.push(this.containerElement);
7878
nextSibling === null ? parent.append(this.containerElement) : nextSibling.before(this.containerElement);

0 commit comments

Comments
 (0)