mirror of
https://github.com/danbulant/discord.js
synced 2026-06-09 01:31:29 +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) {
|
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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue