diff --git a/src/module-cache.coffee b/src/module-cache.coffee index 26b98309b..f340b340d 100644 --- a/src/module-cache.coffee +++ b/src/module-cache.coffee @@ -95,7 +95,7 @@ getCachedModulePath = (relativePath, parentModule) -> return unless candidates? for version, resolvedPath of candidates - if Module._cache[resolvedPath] and satisfies(version, range) + if Module._cache.hasOwnProperty(resolvedPath) and satisfies(version, range) return resolvedPath undefined