Skip to content

Commit 2146b00

Browse files
committed
ref: smaller bytes
1 parent bc58563 commit 2146b00

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

packages/core/src/utils/cloudflareWaitUntil.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ export type MinimalCloudflareContext = {
1010
*/
1111
function _getCloudflareContext(): MinimalCloudflareContext | undefined {
1212
const cfContextSymbol = Symbol.for('__cloudflare-context__');
13-
const globalWithCfContext = GLOBAL_OBJ as typeof GLOBAL_OBJ & {
14-
[cfContextSymbol]?: {
15-
ctx: MinimalCloudflareContext;
16-
};
17-
};
1813

19-
return globalWithCfContext[cfContextSymbol]?.ctx;
14+
return (
15+
GLOBAL_OBJ as typeof GLOBAL_OBJ & {
16+
[cfContextSymbol]?: {
17+
ctx: MinimalCloudflareContext;
18+
};
19+
}
20+
)[cfContextSymbol]?.ctx;
2021
}
2122

2223
/**

packages/core/src/utils/flushIfServerless.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export async function flushIfServerless(
5959
}
6060

6161
if (isCloudflareWaitUntilAvailable()) {
62-
// If the cloudflareWaitUntil function is available, use it to flush the events, if not then fallback to the regular flush
62+
// If the cloudflareWaitUntil function is available, use it to flush the events
6363
cloudflareWaitUntil(flushWithTimeout(timeout));
6464
return;
6565
}

0 commit comments

Comments
 (0)