diff --git a/src/channel/channel.js b/src/channel/channel.js index 096f8866..8b9b2a75 100644 --- a/src/channel/channel.js +++ b/src/channel/channel.js @@ -317,6 +317,15 @@ Channel.prototype.checkModules = function (fn, args, cb) { return; } + if (!self.modules) { + LOGGER.warn( + 'checkModules(%s): self.modules is undefined; dead=%s', + fn, + self.dead + ); + return; + } + var module = self.modules[m]; module[fn].apply(module, args); };