1
1
import { deprecate } from '@ember/debug' ;
2
2
3
- import { LOG_METRIC_COUNTS } from '@warp-drive/build-config/debugging' ;
3
+ import { DEBUG_RELATIONSHIP_NOTIFICATIONS , LOG_METRIC_COUNTS } from '@warp-drive/build-config/debugging' ;
4
4
import { DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE } from '@warp-drive/build-config/deprecations' ;
5
5
import { DEBUG } from '@warp-drive/build-config/env' ;
6
6
import { assert } from '@warp-drive/build-config/macros' ;
@@ -218,10 +218,13 @@ function replaceRelatedRecordsRemote(graph: Graph, op: ReplaceRelatedRecordsOper
218
218
if ( relationship . additions ?. has ( identifier ) ) {
219
219
relationship . additions . delete ( identifier ) ;
220
220
} else {
221
- if ( ! relationship . isDirty ) {
222
- console . log (
223
- `setting relationship to dirty because the remote addition was not in our previous list of local additions`
224
- ) ;
221
+ if ( DEBUG_RELATIONSHIP_NOTIFICATIONS ) {
222
+ if ( ! relationship . isDirty ) {
223
+ // eslint-disable-next-line no-console
224
+ console . log (
225
+ `setting relationship to dirty because the remote addition was not in our previous list of local additions`
226
+ ) ;
227
+ }
225
228
}
226
229
relationship . isDirty = true ;
227
230
}
@@ -234,10 +237,13 @@ function replaceRelatedRecordsRemote(graph: Graph, op: ReplaceRelatedRecordsOper
234
237
if ( relationship . removals ?. has ( identifier ) ) {
235
238
relationship . removals . delete ( identifier ) ;
236
239
} else {
237
- if ( ! relationship . isDirty ) {
238
- console . log (
239
- `setting relationship to dirty because the remote removal was not in our previous list of local removals`
240
- ) ;
240
+ if ( DEBUG_RELATIONSHIP_NOTIFICATIONS ) {
241
+ if ( ! relationship . isDirty ) {
242
+ // eslint-disable-next-line no-console
243
+ console . log (
244
+ `setting relationship to dirty because the remote removal was not in our previous list of local removals`
245
+ ) ;
246
+ }
241
247
}
242
248
relationship . isDirty = true ;
243
249
}
0 commit comments