From 0c30eda13593d990987250fad8babec1357d7e5c Mon Sep 17 00:00:00 2001 From: Micky Brunetti Date: Thu, 23 May 2013 17:47:05 +0900 Subject: [PATCH] Return path on false positive --- lib/component.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/component.js b/lib/component.js index 007bacd4..ec4c057c 100644 --- a/lib/component.js +++ b/lib/component.js @@ -1,4 +1,3 @@ - /** * Module dependencies. */ @@ -40,7 +39,7 @@ exports.lookup = function(pkg, paths){ for (var i = 0; i < paths.length; ++i) { var path = join(paths[i], pkg); debug('check %s', path); - if (exists(path)) { + if (exists(join(path, 'component.json'))) { debug('found %s', path); return path; }