refactor: use Object.assign instead of Object.create for cloning nodePath
because Object.keys omits many of the methods on the filerPath module when using Object.create
This commit is contained in:
parent
e94543471b
commit
fb100b165a
|
@ -10,7 +10,7 @@ process.cwd = () => '/';
|
||||||
* a few things we need for the browser environment.
|
* a few things we need for the browser environment.
|
||||||
*/
|
*/
|
||||||
const nodePath = require('path');
|
const nodePath = require('path');
|
||||||
const filerPath = Object.create(nodePath);
|
const filerPath = Object.assign({}, nodePath);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Patch path.basename() to return / vs. ''
|
* Patch path.basename() to return / vs. ''
|
||||||
|
|
Loading…
Reference in New Issue