From db88a07e8c53aa3aef0948e12da7d4303ff71344 Mon Sep 17 00:00:00 2001 From: Jason Rudolph Date: Fri, 4 May 2018 14:24:57 -0400 Subject: [PATCH] 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: https://github.com/nodejs/node/commit/https://github.com/nodejs/node/commit/403b89e72b6367934ca3c36d389ce0f3214ffbf5 --- src/module-cache.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/module-cache.coffee b/src/module-cache.coffee index 5bc162ab1..358ed3393 100644 --- a/src/module-cache.coffee +++ b/src/module-cache.coffee @@ -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