diff --git a/src/tasks/sync-registries.js b/src/tasks/sync-registries.js index c01d3011..8b7d6683 100644 --- a/src/tasks/sync-registries.js +++ b/src/tasks/sync-registries.js @@ -221,7 +221,7 @@ const syncOrganizationAudit = async (organization) => { const rootHistoryCount = rootHistory.length; const syncRemaining = rootHistoryCount - historyIndex; - const isSynced = syncRemaining === 0; + const isSynced = Boolean(rootHistory?.[historyIndex + 1]) === false; await Organization.update( {