Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix import in ternary statement #1779

Merged
merged 4 commits into from
Nov 19, 2024
Merged
Changes from all commits
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
4 changes: 3 additions & 1 deletion packages/client/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ export async function request(url, options = {}, callback) {
let { protocol, hostname, port, pathname, search, hash } = new URL(url);

// reference the default export so tests can mock it
let { default: http } = await import(protocol === 'https:' ? 'https' : 'http');
// bundling cli inside electron (LCNC) fails if we import it like
// this: await import(protocol === 'https:' ? 'https' : 'http');
let { default: http } = protocol === 'https:' ? await import('https') : await import('http');
khushhalm marked this conversation as resolved.
Show resolved Hide resolved
let { proxyAgentFor } = await import('./proxy.js');

// automatically stringify body content
Expand Down
Loading