Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[loader] safer check

  • Loading branch information...
commit 85d6fcb94639232fd92cc9af8f4e5e7b6fa22afe 1 parent 194150a
Fedor Indutny authored February 02, 2011

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  lib/loader.js
2  lib/loader.js
@@ -46,7 +46,7 @@ var loader = module.exports = function(dir, context, callback) {
46 46
       var result = helpers.require(file, context);
47 47
       
48 48
       // If module is disabled - do not load it
49  
-      if (result.exports.enabled === false) return;
  49
+      if (!result.exports || result.exports.enabled === false) return;
50 50
       
51 51
       // Add to modules object
52 52
       var object = result.exports;

0 notes on commit 85d6fcb

Please sign in to comment.
Something went wrong with that request. Please try again.