File tree 1 file changed +12
-4
lines changed
packages/graph/src/-private
1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -235,13 +235,21 @@ function _compare<T>(
235
235
// we can disregard the change notification generation so long as
236
236
// we are not configured to reset on remote update (which is deprecated)
237
237
if ( DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE ) {
238
- if ( ! remoteClearsLocal && i < priorLocalLength ) {
238
+ if ( i < priorLocalLength ) {
239
239
const priorLocalMember = priorLocalState ! [ i ] ;
240
- if ( priorLocalMember !== member ) {
240
+ if ( remoteClearsLocal ) {
241
+ if ( DEBUG_RELATIONSHIP_NOTIFICATIONS ) {
242
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions, no-console
243
+ ! changed && console . log ( `changed because member !== prevMember && remoteClearsLocal` ) ;
244
+ }
245
+ changed = true ;
246
+ } else if ( priorLocalMember !== member ) {
247
+ if ( DEBUG_RELATIONSHIP_NOTIFICATIONS ) {
248
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions, no-console
249
+ ! changed && console . log ( `changed because priorLocalMember !== member && member !== prevMember` ) ;
250
+ }
241
251
changed = true ;
242
252
}
243
- } else {
244
- changed = true ;
245
253
}
246
254
} else {
247
255
if ( i < priorLocalLength ) {
You can’t perform that action at this time.
0 commit comments