mirror of
https://codeberg.org/emersion/gamja.git
synced 2024-11-14 19:05:01 -05:00
lib/client: gracefully handle null in isMyNick/isChannel
This commit is contained in:
parent
0705f4b182
commit
41354d3035
1 changed files with 6 additions and 0 deletions
|
@ -477,10 +477,16 @@ export default class Client extends EventTarget {
|
|||
}
|
||||
|
||||
isMyNick(nick) {
|
||||
if (!nick) {
|
||||
return false;
|
||||
}
|
||||
return this.cm(nick) == this.cm(this.nick);
|
||||
}
|
||||
|
||||
isChannel(name) {
|
||||
if (!name) {
|
||||
return false;
|
||||
}
|
||||
var chanTypes = this.isupport.get("CHANTYPES") || irc.STD_CHANTYPES;
|
||||
return chanTypes.indexOf(name[0]) >= 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue