mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
unset game if empty string is passed (#408)
This commit is contained in:
@@ -1407,6 +1407,9 @@ var InternalClient = (function () {
|
||||
this.idleStatus = this.idleStatus || null; //undefined
|
||||
}
|
||||
|
||||
// convert undefined and empty string to null
|
||||
if (typeof game === "string" && !game.length) game = null;
|
||||
|
||||
this.game = game === null ? null : !game ? this.game || null : typeof game === "string" ? { name: game } : game;
|
||||
|
||||
var packet = {
|
||||
|
||||
Reference in New Issue
Block a user