gha forgot color2

This commit is contained in:
Charsy89 2019-11-20 16:13:20 -07:00
parent 68c7552c30
commit 29fb50e00a
1 changed files with 4 additions and 2 deletions

View File

@ -407,8 +407,10 @@ class Room extends EventEmitter {
if(!isString(msg.set.color) || !/^#[0-9a-f]{6}$/i.test(msg.set.color)) msg.set.color = (!isObj(this.settings) ? this.server.defaultRoomColor : this.settings.color); if(!isString(msg.set.color) || !/^#[0-9a-f]{6}$/i.test(msg.set.color)) msg.set.color = (!isObj(this.settings) ? this.server.defaultRoomColor : this.settings.color);
if(isString(msg.set.color2)){ if(isString(msg.set.color2)){
if(!/^#[0-9a-f]{6}$/i.test(msg.set.color2)){ if(!/^#[0-9a-f]{6}$/i.test(msg.set.color2)){
if(this.settings.color2) msg.set.color2 = this.settings.color2; if(this.settings){
else delete msg.set.color2; // keep it nice and clean if(this.settings.color2) msg.set.color2 = this.settings.color2;
else delete msg.set.color2; // keep it nice and clean
}
} }
}; };
return msg.set; return msg.set;