From 2f198583c4e7a8b05cedb0a31f956f5574361f5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 24 Oct 2018 13:26:05 -0400 Subject: [PATCH] change to this --- src/plugins/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/index.js b/src/plugins/index.js index faf2365992..c5c101873c 100644 --- a/src/plugins/index.js +++ b/src/plugins/index.js @@ -39,13 +39,13 @@ Plugins.initialized = false; var defaultRequire = module.require; module.require = function () { try { - return defaultRequire.apply(module, arguments); + return defaultRequire.apply(this, arguments); } catch (err) { // if we can't find the module try in parent directory // since plugins.js moved into plugins folder if (err.code === 'MODULE_NOT_FOUND') { winston.warn('[plugins/require] please update module.parent.require("' + arguments[0] + '") in your plugin!\n' + err.stack.split('\n')[5]); - return defaultRequire.apply(module, [path.join('../', arguments[0])]); + return defaultRequire.apply(this, [path.join('../', arguments[0])]); } throw err; }