Skip to content

Commit

Permalink
fix: duplex half once
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Jun 15, 2023
1 parent 19f0acb commit a10d625
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions packages/primitives/src/primitives/fetch.js
Expand Up @@ -146,10 +146,10 @@ export function setGlobalDispatcher(agent) {
* Add `duplex: 'half'` by default to all requests
*/
function addDuplexToInit(init) {
if (typeof init === 'undefined' || typeof init === 'object') {
return { duplex: 'half', ...init }
}
return init
return typeof init === 'undefined' ||
(typeof init === 'object' && init.duplex === undefined)
? { duplex: 'half', ...init }
: init
}

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/src/cli/repl.ts
Expand Up @@ -14,7 +14,7 @@ const writer: createRepl.REPLWriter = (output) => {
}

const repl = createRepl.start({ prompt: 'ƒ => ', writer })
repl.setupHistory(join(homedir(), '.edge_runtime_repl_history'), () => { })
repl.setupHistory(join(homedir(), '.edge_runtime_repl_history'), () => {})

Object.getOwnPropertyNames(repl.context).forEach(
(mod) => delete repl.context[mod]
Expand Down

0 comments on commit a10d625

Please sign in to comment.