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:
Ben Heidemann 2021-04-18 15:40:34 +01:00 committed by David Humphrey
parent e94543471b
commit fb100b165a
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ process.cwd = () => '/';
* a few things we need for the browser environment.
*/
const nodePath = require('path');
const filerPath = Object.create(nodePath);
const filerPath = Object.assign({}, nodePath);
/**
* Patch path.basename() to return / vs. ''