Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit 383769a

Browse files
committed
Add support for future Element versions
Signed-off-by: Dominik Henneke <[email protected]>
1 parent f1ac8d5 commit 383769a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.changeset/tender-papayas-poke.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@nordeck/element-web-opendesk-module': patch
3+
---
4+
5+
Add support for future Element versions.

packages/element-web-opendesk-module/src/OpenDeskModule.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ export class OpenDeskModule extends RuntimeModule {
8383
// Add the ref to our only children -> the MatrixChat component
8484
const children =
8585
React.Children.only(this.props.children) &&
86-
React.isValidElement<{ ref: unknown }>(this.props.children)
86+
React.isValidElement<{ ref: unknown }>(this.props.children) &&
87+
'ref' in this.props.children &&
88+
!this.props.children.ref
8789
? React.cloneElement(this.props.children, { ref: this.ref })
8890
: this.props.children;
8991

0 commit comments

Comments
 (0)