From a851a2bee4156d3c88666dcc5640b9c010cd17f4 Mon Sep 17 00:00:00 2001 From: reality Date: Sun, 26 May 2013 12:42:49 +0000 Subject: [PATCH] Fix possible crash with outputPrefix when module is not loaded properly [#462] --- run.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run.js b/run.js index 07a017e..17d8c8e 100644 --- a/run.js +++ b/run.js @@ -97,7 +97,7 @@ DBot.prototype.t = function(string, formatData) { if(_.has(this.strings[string], lang)) { var module = this.stringMap[string]; formattedString = this.strings[string][lang].format(formatData); - if(this.config[module].outputPrefix) { + if(this.config[module] && this.config[module].outputPrefix) { formattedString = '[' + this.config[module].outputPrefix + '] ' + formattedString; }