mirror of
https://github.com/reality/dbot.git
synced 2024-12-11 21:39:37 +01:00
Fix possible crash with outputPrefix when module is not loaded properly [#462]
This commit is contained in:
parent
1e2a823ef2
commit
a851a2bee4
2
run.js
2
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user