We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b916ac commit 686a82cCopy full SHA for 686a82c
src/DailyProvider.tsx
@@ -41,6 +41,22 @@ export const DailyProvider: React.FC<React.PropsWithChildren<Props>> = ({
41
);
42
const eventsMap = useRef<EventsMap>({});
43
44
+ /**
45
+ * Update callObject reference, in case externally created instance has changed.
46
+ */
47
+ useEffect(() => {
48
+ if (
49
+ 'callObject' in props &&
50
+ callObject &&
51
+ props.callObject &&
52
+ // TODO: Replace _callFrameId check with something "official".
53
+ // @ts-ignore
54
+ callObject?._callFrameId !== props?.callObject?._callFrameId
55
+ ) {
56
+ setCallObject(props.callObject);
57
+ }
58
+ }, [callObject, props]);
59
+
60
/**
61
* Generic event handler to loop through registered event callbacks.
62
*/
0 commit comments