From 0c0c1da0d5120097e831c50d77a034986a15e57f Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Mon, 26 Sep 2016 22:53:35 -0400 Subject: [PATCH] Fix Presence/Game.equals with null/undefined --- src/structures/Presence.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/structures/Presence.js b/src/structures/Presence.js index ac528dfa9..e38efd3af 100644 --- a/src/structures/Presence.js +++ b/src/structures/Presence.js @@ -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