Fix Presence/Game.equals with null/undefined

This commit is contained in:
Schuyler Cebulskie
2016-09-26 22:53:35 -04:00
parent 909af2084f
commit 0c0c1da0d5

View File

@@ -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