File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
packages/react-composites/src/composites/CallComposite/hooks Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import { CommunicationIdentifierKind } from '@azure/communication-common';
13
13
import { EnvironmentInfo } from '@azure/communication-calling' ;
14
14
/* @conditional -compile-remove(breakout-rooms) */ /* @conditional -compile-remove(media-access) */
15
15
import { CallNotifications } from '@internal/calling-stateful-client' ;
16
+ import { _safeJSONStringify } from '@internal/acs-ui-common' ;
16
17
/**
17
18
* @private
18
19
*/
@@ -105,7 +106,14 @@ const memoizeState = memoizeOne(
105
106
} )
106
107
) ;
107
108
108
- const memoizeCalls = memoizeOne ( ( call ?: CallState ) : { [ key : string ] : CallState } => ( call ? { [ call . id ] : call } : { } ) ) ;
109
+ const isCallEqual = ( newArgs : any [ ] , lastArgs : any [ ] ) : boolean => {
110
+ return _safeJSONStringify ( newArgs ) === _safeJSONStringify ( lastArgs ) ;
111
+ } ;
112
+
113
+ const memoizeCalls = memoizeOne (
114
+ ( call ?: CallState ) : { [ key : string ] : CallState } => ( call ? { [ call . id ] : call } : { } ) ,
115
+ isCallEqual
116
+ ) ;
109
117
110
118
const adaptCompositeState = ( compositeState : CallAdapterState ) : CallClientState => {
111
119
return memoizeState (
You can’t perform that action at this time.
0 commit comments