mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-03-30 15:08:28 +00:00
Fix process undefined error in browsers.
This commit is contained in:
parent
06a68bbe1c
commit
3c79588778
@ -3,7 +3,7 @@ const win32Reg = /((?<=\\)\\+)|(^\.\\)|((?<=\\)\.\\)/g
|
||||
|
||||
const createJoin = isWin => (...paths) => paths.join(isWin ? '\\' : '/').replace(isWin ? win32Reg : posixReg, '')
|
||||
|
||||
export const join = createJoin(process?.platform === 'win32')
|
||||
export const join = createJoin(typeof process !== 'undefined' && process?.platform === 'win32')
|
||||
|
||||
export const posixJoin = createJoin(false)
|
||||
export const win32Join = createJoin(true)
|
||||
|
Loading…
x
Reference in New Issue
Block a user