diff options
author | Johannes Ewald <johannes.ewald@peerigon.com> | 2017-11-11 05:24:37 +0300 |
---|---|---|
committer | Johannes Ewald <johannes.ewald@peerigon.com> | 2017-11-11 05:24:37 +0300 |
commit | 9cd5ea14063d56e883ca8ba34a9b498ff480d66a (patch) | |
tree | c5ab1ddf226f92bbe27c044942dfd5f78e89277c /lib | |
parent | 457955afab6e3f9baf649b6d9275d08f27b671ac (diff) |
Remove legacy code for node < 4
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rewire.js | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/rewire.js b/lib/rewire.js index cbd24c2..e678f37 100644 --- a/lib/rewire.js +++ b/lib/rewire.js @@ -23,14 +23,6 @@ function internalRewire(parentModulePath, targetPath) { // Resolve full filename relative to the parent module targetPath = Module._resolveFilename(targetPath, parentModulePath); - // Special support for older node versions that returned an array on Module._resolveFilename - // @see https://github.com/joyent/node/blob/865b077819a9271a29f982faaef99dc635b57fbc/lib/module.js#L319 - // TODO Remove this switch on the next major release - /* istanbul ignore next because it will be removed soon */ - if (Array.isArray(targetPath)) { - targetPath = targetPath[1]; - } - // Create testModule as it would be created by require() targetModule = new Module(targetPath, parentModulePath); |