Skip to content

Commit

Permalink
fix index
Browse files Browse the repository at this point in the history
  • Loading branch information
cbaker6 committed Apr 24, 2023
1 parent 7731ef9 commit f0a728c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/ParseCareKit/ParseRemote.swift
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public class ParseRemote: OCKRemoteSynchronizable {
for (index, revision) in revisions.enumerated() {
let record = try await revision.fetchEntities().convertToCareKit()
mergeRevision(record)
if index < revisions.count {
if index < revisions.count - 1 {
self.notifyRevisionProgress(index + 1,
total: revisions.count)
}
Expand Down Expand Up @@ -298,7 +298,7 @@ public class ParseRemote: OCKRemoteSynchronizable {
remoteClock: parseClock,
remoteClockValue: logicalClock)
try await remoteRevision.save()
if index < deviceRevisions.count {
if index < deviceRevisions.count - 1 {
self.notifyRevisionProgress(index + 1,
total: deviceRevisions.count)
} else {
Expand Down

0 comments on commit f0a728c

Please sign in to comment.