diff --git a/Sources/ParseCareKit/ParseRemote.swift b/Sources/ParseCareKit/ParseRemote.swift index 5623de275..07d97dd0d 100644 --- a/Sources/ParseCareKit/ParseRemote.swift +++ b/Sources/ParseCareKit/ParseRemote.swift @@ -204,16 +204,9 @@ public class ParseRemote: OCKRemoteSynchronizable { // 3. Pull the latest revisions from the remote. let localClock = knowledgeVector.clock(for: self.uuid) - let query: Query! - if localClock > 0 { - query = PCKRevisionRecord.query(ObjectableKey.logicalClock > localClock, + let query = PCKRevisionRecord.query(ObjectableKey.logicalClock >= localClock, ObjectableKey.clockUUID == self.uuid) - .order([.ascending(ObjectableKey.logicalClock)]) - } else { - query = PCKRevisionRecord.query(ObjectableKey.logicalClock >= localClock, - ObjectableKey.clockUUID == self.uuid) - .order([.ascending(ObjectableKey.logicalClock)]) - } + .order([.ascending(ObjectableKey.logicalClock)]) do { let revisions = try await query.find() self.notifyRevisionProgress(0,