Skip to content

Commit 277e9b6

Browse files
committed
add comment
1 parent bd89080 commit 277e9b6

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

packages/adapter-cloudflare-workers/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ export default function ({ config = 'wrangler.toml', platformProxy = {} } = {})
150150
},
151151

152152
emulate() {
153+
// we want to invoke `getPlatformProxy` only once and await it only when it is accessed
153154
const getting_platform = (async () => {
154155
const proxy = await getPlatformProxy(platformProxy);
155156
const platform = /** @type {App.Platform} */ ({

packages/adapter-cloudflare/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ export default function (options = {}) {
145145
}
146146
},
147147
emulate() {
148+
// we want to invoke `getPlatformProxy` only once and await it only when it is accessed
148149
const getting_platform = (async () => {
149150
const proxy = await getPlatformProxy(options.platformProxy);
150151
const platform = /** @type {App.Platform} */ ({

0 commit comments

Comments
 (0)