From 3970c5005babd5ef360a87ce3c3e8fbdc3f66634 Mon Sep 17 00:00:00 2001 From: Ash <28841569+Asshley@users.noreply.github.com> Date: Fri, 31 Aug 2018 22:51:11 -0400 Subject: [PATCH] cleanup: use null over undefined (#2810) --- src/structures/MessageAttachment.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structures/MessageAttachment.js b/src/structures/MessageAttachment.js index a8d74ee67..90ae4bbc2 100644 --- a/src/structures/MessageAttachment.js +++ b/src/structures/MessageAttachment.js @@ -66,13 +66,13 @@ class MessageAttachment { * The height of this attachment (if an image or video) * @type {?number} */ - this.height = data.height; + this.height = typeof data.height !== 'undefined' ? data.height : null; /** * The width of this attachment (if an image or video) * @type {?number} */ - this.width = data.width; + this.width = typeof data.width !== 'undefined' ? data.width : null; } toJSON() {