use diff.length for hasMore check

This commit is contained in:
Abhinav 2023-10-11 18:28:21 +05:30
parent eab65ad893
commit df29708bc3
2 changed files with 1 additions and 2 deletions

View file

@ -160,7 +160,7 @@ const syncEntity = async <T>(type: EntityType): Promise<Entity<T>> => {
addLogLine(
`Syncing ${type} entities syncedEntitiesCount: ${nonDeletedEntities.length}`
);
} while (response.hasMore);
} while (response.diff.length === DIFF_LIMIT);
} catch (e) {
logError(e, 'Sync entity failed');
}

View file

@ -44,5 +44,4 @@ export interface Entity<T>
export interface EntitySyncDiffResponse {
diff: EncryptedEntity[];
hasMore: boolean;
}