From 30fca53c7226abfbb1071c1e09f9358544cf1444 Mon Sep 17 00:00:00 2001 From: Hri7566 Date: Tue, 13 Apr 2021 17:38:29 -0400 Subject: [PATCH] fix user --- src/User.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/User.js b/src/User.js index 61a8a66..0c3edd4 100644 --- a/src/User.js +++ b/src/User.js @@ -3,7 +3,7 @@ const Database = require("./Database"); class User { constructor(cl, data) { this.server = cl.server; - this.name = data.name; + this.name = typeof(data.name) == 'string' ? data.name : "Anonymous"; this._id = data._id; this.color = data.color; this.ip = data.ip;