Fix test failure re: "Module._cache.hasOwnProperty is not a function"

Example build failure:
https://ci.appveyor.com/project/Atom/atom/build/job/fvtxos5ys6a5lek1#L634

As of Node 8.0.0, Module._cache.hasOwnProperty is no longer a function:
403b89e72b
This commit is contained in:
Jason Rudolph
2018-05-04 14:24:57 -04:00
parent 28c8267cf7
commit db88a07e8c

View File

@@ -189,7 +189,7 @@ resolveModulePath = (relativePath, parentModule) ->
return unless candidates?
for version, resolvedPath of candidates
if Module._cache.hasOwnProperty(resolvedPath) or isCorePath(resolvedPath)
if Module._cache[resolvedPath] or isCorePath(resolvedPath)
return resolvedPath if satisfies(version, range)
return