assert that require() has a truthy path
authorJames Campos <james.r.campos@gmail.com>
Wed, 9 Jan 2013 17:01:22 +0000 (09:01 -0800)
committerisaacs <i@izs.me>
Wed, 16 Jan 2013 18:49:19 +0000 (10:49 -0800)
lib/module.js

index ed25f92..1d9e5d1 100644 (file)
@@ -359,6 +359,7 @@ Module.prototype.load = function(filename) {
 
 
 Module.prototype.require = function(path) {
+  assert(path, 'missing path');
   return Module._load(path, this);
 };