diff --git a/build/get-nodejs/get-nodejs-debug.js b/build/get-nodejs/get-nodejs-debug.js index 6e476881710..f6d1ef3a4d4 100644 --- a/build/get-nodejs/get-nodejs-debug.js +++ b/build/get-nodejs/get-nodejs-debug.js @@ -106,7 +106,9 @@ YUI.add('get', function (Y, NAME) { } else { try { // Try to resolve paths relative to the module that required yui. - url = Module._findPath(url, Module._resolveLookupPaths(url, module.parent.parent)[1]); + var path = Module._resolveLookupPaths(url, module.parent.parent, true); + + url = Module._findPath(url, (typeof path === 'string' || path === null) ? path : path[1]); if (Y.config.useSync) { //Needs to be in useSync diff --git a/build/get-nodejs/get-nodejs.js b/build/get-nodejs/get-nodejs.js index 8e07eed9c34..34e6a5b6f82 100644 --- a/build/get-nodejs/get-nodejs.js +++ b/build/get-nodejs/get-nodejs.js @@ -102,7 +102,9 @@ YUI.add('get', function (Y, NAME) { } else { try { // Try to resolve paths relative to the module that required yui. - url = Module._findPath(url, Module._resolveLookupPaths(url, module.parent.parent)[1]); + var path = Module._resolveLookupPaths(url, module.parent.parent, true); + + url = Module._findPath(url, (typeof path === 'string' || path === null) ? path : path[1]); if (Y.config.useSync) { //Needs to be in useSync diff --git a/build/yui-nodejs/yui-nodejs-debug.js b/build/yui-nodejs/yui-nodejs-debug.js index c2aaced1232..5ca56279c80 100644 --- a/build/yui-nodejs/yui-nodejs-debug.js +++ b/build/yui-nodejs/yui-nodejs-debug.js @@ -4383,7 +4383,9 @@ YUI.add('get', function (Y, NAME) { } else { try { // Try to resolve paths relative to the module that required yui. - url = Module._findPath(url, Module._resolveLookupPaths(url, module.parent.parent)[1]); + var path = Module._resolveLookupPaths(url, module.parent.parent, true); + + url = Module._findPath(url, (typeof path === 'string' || path === null) ? path : path[1]); if (Y.config.useSync) { //Needs to be in useSync diff --git a/build/yui-nodejs/yui-nodejs.js b/build/yui-nodejs/yui-nodejs.js index ecbd1875100..b3c92d93220 100644 --- a/build/yui-nodejs/yui-nodejs.js +++ b/build/yui-nodejs/yui-nodejs.js @@ -4132,7 +4132,9 @@ YUI.add('get', function (Y, NAME) { } else { try { // Try to resolve paths relative to the module that required yui. - url = Module._findPath(url, Module._resolveLookupPaths(url, module.parent.parent)[1]); + var path = Module._resolveLookupPaths(url, module.parent.parent, true); + + url = Module._findPath(url, (typeof path === 'string' || path === null) ? path : path[1]); if (Y.config.useSync) { //Needs to be in useSync