fix user
This commit is contained in:
parent
0ab9231f85
commit
c4d9817291
|
@ -3,7 +3,7 @@ const Database = require("./Database");
|
||||||
class User {
|
class User {
|
||||||
constructor(cl, data) {
|
constructor(cl, data) {
|
||||||
this.server = cl.server;
|
this.server = cl.server;
|
||||||
this.name = data.name;
|
this.name = typeof(data.name) == 'string' ? data.name : "Anonymous";
|
||||||
this._id = data._id;
|
this._id = data._id;
|
||||||
this.color = data.color;
|
this.color = data.color;
|
||||||
this.ip = data.ip;
|
this.ip = data.ip;
|
||||||
|
|
Loading…
Reference in New Issue