No need to do if (internalModuleCache...), it's in requireNative.

This commit is contained in:
Herbert Vojčík authored and Ryan Dahl committed 2010-09-16 13:46:27 -07:00
1 parent d429033fd7
commit 4e6b9b0992
1 file changed
+1 -6
+1 -6
View File
@@ -455,13 +455,8 @@ var module = (function () {
debug("loadModule REQUEST " + (request) + " parent: " + parent.id);
// native modules always take precedence.
var cachedNative = internalModuleCache[id];
if (cachedNative) {
return callback ? callback(null, cachedNative.exports) : cachedNative.exports;
}
if (nativeSource[id]) {
debug('load native module ' + id);
//debug('load native module ' + id);
var nativeMod = requireNative(id);
return callback ? callback(null, nativeMod) : nativeMod;
}