Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/wrangler/src/api/integrations/platform/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ export async function getPlatformProxy<

let remoteProxySession: RemoteProxySession | undefined = undefined;
if (experimentalRemoteBindings && rawConfig.configPath) {
const maybeRemoteProxySessionWrap =
await maybeStartOrUpdateRemoteProxySession(rawConfig.configPath);
remoteProxySession = maybeRemoteProxySessionWrap?.session;
remoteProxySession = (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That look messy to me. IMO the former version looked better!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and by that I also mean that you do not have to implement all comments if they don't make sense to you - even my comments :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this wasn't quite what I was suggestion. I was thinking of (await maybeStartOrUpdateRemoteProxySession(config.configPath))?. session.

That said, this was mostly because the intermediate variable didn't add much clarity. What about:

({session: remoteProxySession } = await maybeStartOrUpdateRemoteProxySession(config.configPath)

(await maybeStartOrUpdateRemoteProxySession(rawConfig.configPath)) ?? {}
).session;
}

const miniflareOptions = await getMiniflareOptionsFromConfig({
Expand Down
Loading