don't attempt to require a directory

v1.18.x
psychobunny 11 years ago
parent 5ffeb3319b
commit 78dea8ea40

@ -41,8 +41,11 @@ Sockets.init = function(server) {
files.splice(files.indexOf('index.js'), 1);
async.each(files, function(lib, next) {
lib = lib.slice(0, -3);
Namespaces[lib] = require('./' + lib);
if (lib.slice(0, -3) === '.js') {
lib = lib.slice(0, -3);
Namespaces[lib] = require('./' + lib);
}
next();
});
});

Loading…
Cancel
Save