Skip to content
This repository was archived by the owner on Jan 31, 2023. It is now read-only.

Commit 44e9df0

Browse files
committed
fix(process.js): fix morphic with 'node' process
1 parent fc6be04 commit 44e9df0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

process.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ export function exit (code) {
1616
send('exit', { value: code || 0 })
1717
}
1818

19-
const isNode = parent?.process?.versions?.node
2019
const parent = typeof window === 'object' ? window : globalThis
20+
const isNode = parent?.process?.versions?.node
2121
const process = isNode
22-
? process
22+
? globalThis.process
2323
: Object.create(null, Object.getOwnPropertyDescriptors({
2424
...EventEmitter.prototype,
2525
homedir,

0 commit comments

Comments
 (0)