cleanup: use null over undefined (#2810)

This commit is contained in:
Ash
2018-08-31 22:51:11 -04:00
committed by Crawl
parent f75b80d96b
commit 3970c5005b

View File

@@ -66,13 +66,13 @@ class MessageAttachment {
* The height of this attachment (if an image or video) * The height of this attachment (if an image or video)
* @type {?number} * @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) * The width of this attachment (if an image or video)
* @type {?number} * @type {?number}
*/ */
this.width = data.width; this.width = typeof data.width !== 'undefined' ? data.width : null;
} }
toJSON() { toJSON() {