Skip to content

Commit 377a369

Browse files
committed
Prevents unneeded requests for org members when drafts list is empty
1 parent c77c2ac commit 377a369

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/plus/drafts/draftsService.ts

+2
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,8 @@ export class DraftService implements Disposable {
475475

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

478+
if (drafts.length === 0) return [];
479+
478480
const [subscriptionResult, membersResult] = await Promise.allSettled([
479481
this.container.subscription.getSubscription(),
480482
this.container.organizations.getMembers(),

0 commit comments

Comments
 (0)