Skip to content

Commit 86d045a

Browse files
committed
Adapt logic
1 parent ef86390 commit 86d045a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/gitbook/src/lib/waitUntil.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ export async function waitUntil(promise: Promise<unknown>) {
5757
context.ctx.waitUntil(promise);
5858
return;
5959
}
60-
}
61-
62-
const cloudflareContext = await getGlobalContext();
63-
if ('waitUntil' in cloudflareContext) {
64-
cloudflareContext.waitUntil(promise);
65-
return;
60+
} else {
61+
const cloudflareContext = await getGlobalContext();
62+
if ('waitUntil' in cloudflareContext) {
63+
cloudflareContext.waitUntil(promise);
64+
return;
65+
}
6666
}
6767
}
6868

0 commit comments

Comments
 (0)