diff --git a/lib/client.js b/lib/client.js index ffe6dfe..41eb476 100644 --- a/lib/client.js +++ b/lib/client.js @@ -436,11 +436,12 @@ export default class Client extends EventTarget { setCaseMapping(name) { this.cm = irc.CaseMapping.byName(name); - this.whoisDB = new irc.CaseMapMap(this.whoisDB, this.cm); if (!this.cm) { console.error("Unsupported case-mapping '" + name + "', falling back to RFC 1459"); this.cm = irc.CaseMapping.RFC1459; } + + this.whoisDB = new irc.CaseMapMap(this.whoisDB, this.cm); } isMyNick(nick) {