mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 13:02:38 +00:00
Fix Presence/Game.equals with null/undefined
This commit is contained in:
parent
909af2084f
commit
0c0c1da0d5
1 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue