Created
July 7, 2015 01:11
-
-
Save msimerson/80fe184e12ef5ad08f4e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/plugins.js b/plugins.js | |
index 4ef6345..8af4158 100644 | |
--- a/plugins.js | |
+++ b/plugins.js | |
@@ -193,9 +193,8 @@ plugins._load_and_compile_plugin = function (name) { | |
throw 'Loading plugin ' + name + ' failed: ' + last_err; | |
} | |
var custom_require = function _haraka_require (module) { | |
- if (!/^\./.test(module)) { | |
- return require(module); | |
- } | |
+ if (!/^\./.test(module)) return require(module); | |
+ if (/package\.json$/.test(fp[i])) return require(module); | |
if (utils.existsSync(__dirname + '/' + module + '.js') || | |
utils.existsSync(__dirname + '/' + module)) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment