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