Skip to content

Commit

Permalink
Prevents unneeded requests for org members when drafts list is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
d13 committed Jan 31, 2025
1 parent c77c2ac commit 377a369
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/plus/drafts/draftsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,8 @@ export class DraftService implements Disposable {

const drafts = ((await rsp.json()) as Result).data;

if (drafts.length === 0) return [];

const [subscriptionResult, membersResult] = await Promise.allSettled([
this.container.subscription.getSubscription(),
this.container.organizations.getMembers(),
Expand Down

0 comments on commit 377a369

Please sign in to comment.