Skip to content

Commit

Permalink
fix: only wait if delta gt 0
Browse files Browse the repository at this point in the history
  • Loading branch information
mary-ext committed Apr 1, 2024
1 parent c429362 commit 1ddb3ef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/desktop/lib/moderation/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ const requestLock = async () => {

const delta = nextUpdatedAt - Date.now();

await new Promise((resolve) => setTimeout(resolve, delta));
if (delta > 0) {
await new Promise((resolve) => setTimeout(resolve, delta));
}

let views: AppBskyLabelerDefs.LabelerViewDetailed[] | undefined;
try {
Expand Down

0 comments on commit 1ddb3ef

Please sign in to comment.