Skip to content

Commit 0f4bf90

Browse files
refactor(QueryObserver): combine prop checks
1 parent fcd615c commit 0f4bf90

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/core/queryObserver.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -612,11 +612,10 @@ export class QueryObserver<
612612

613613
const { notifyOnChangeProps } = this.options
614614

615-
if (notifyOnChangeProps === 'all') {
616-
return true
617-
}
618-
619-
if (!notifyOnChangeProps && !this.trackedProps.length) {
615+
if (
616+
notifyOnChangeProps === 'all' ||
617+
(!notifyOnChangeProps && !this.trackedProps.length)
618+
) {
620619
return true
621620
}
622621

0 commit comments

Comments
 (0)