Skip to content

Commit

Permalink
fix: Failed to execute 'observe' on '_ConnectionObserver': parameter …
Browse files Browse the repository at this point in the history
…1 is not of type 'Node' or a DOMString.
  • Loading branch information
linonetwo committed Mar 28, 2024
1 parent c586054 commit 736378e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class ReactWidgetImpl<
if (this.root === undefined || this.containerElement === undefined) {
this.containerElement = document.createElement('div');
this.root = ReactDom.createRoot(this.containerElement);
this.connectionObserver.observe(this.parentDomNode);
this.connectionObserver?.observe?.(this.parentDomNode ?? this.containerElement);
}
this.domNodes.push(this.containerElement);
nextSibling === null ? parent.append(this.containerElement) : nextSibling.before(this.containerElement);
Expand Down

0 comments on commit 736378e

Please sign in to comment.