mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
Fix Presence/Game.equals with null/undefined
This commit is contained in:
@@ -32,6 +32,7 @@ class Presence {
|
||||
*/
|
||||
equals(other) {
|
||||
return (
|
||||
other &&
|
||||
this.status === other.status &&
|
||||
this.game ? this.game.equals(other.game) : !other.game
|
||||
);
|
||||
@@ -78,6 +79,7 @@ class Game {
|
||||
*/
|
||||
equals(other) {
|
||||
return (
|
||||
other &&
|
||||
this.name === other.name &&
|
||||
this.type === other.type &&
|
||||
this.url === other.url
|
||||
|
||||
Reference in New Issue
Block a user