mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 02:53:31 +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
|
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;
|
this.game = game === null ? null : !game ? this.game || null : typeof game === "string" ? { name: game } : game;
|
||||||
|
|
||||||
var packet = {
|
var packet = {
|
||||||
|
|||||||
@@ -1205,6 +1205,9 @@ export default class InternalClient {
|
|||||||
this.idleStatus = this.idleStatus || null; //undefined
|
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;
|
this.game = game === null ? null : !game ? this.game || null : typeof game === "string" ? {name: game} : game;
|
||||||
|
|
||||||
var packet = {
|
var packet = {
|
||||||
|
|||||||
Reference in New Issue
Block a user