consistency: getters return null instead of undefined (#2385)

This commit is contained in:
bdistin
2018-03-08 10:15:06 -06:00
committed by Isabella
parent a68f14500d
commit 799eea957e
5 changed files with 10 additions and 10 deletions

View File

@@ -186,7 +186,7 @@ class User extends Base {
* @readonly
*/
get dmChannel() {
return this.client.channels.filter(c => c.type === 'dm').find(c => c.recipient.id === this.id);
return this.client.channels.filter(c => c.type === 'dm').find(c => c.recipient.id === this.id) || null;
}
/**