Fixed crash caused by connecting with deleted flair.
This commit is contained in:
parent
e226d45dce
commit
46e1b2c45b
|
|
@ -252,7 +252,6 @@
|
|||
"hooray",
|
||||
"flambe",
|
||||
"flambé",
|
||||
"tenturnyourrainsoundsoff",
|
||||
"jabroni",
|
||||
"lame",
|
||||
"yoke",
|
||||
|
|
|
|||
|
|
@ -27,7 +27,17 @@ module.exports = class{
|
|||
this.user = userDB.user;
|
||||
this.rank = userDB.rank;
|
||||
this.highLevel = userDB.highLevel;
|
||||
this.flair = userDB.flair.name;
|
||||
|
||||
//Check to make sure users flair entry from DB is good
|
||||
if(userDB.flair != null){
|
||||
//Use flair from DB
|
||||
this.flair = userDB.flair.name;
|
||||
//Otherwise
|
||||
}else{
|
||||
//Gracefully default to classic
|
||||
this.flair = 'classic';
|
||||
}
|
||||
|
||||
this.chanRank = chanRank;
|
||||
this.channel = channel;
|
||||
this.sockets = [socket.id];
|
||||
|
|
|
|||
Loading…
Reference in a new issue