From 4a24e8c12c1eeef84b804ea21c5b5d1f0573c24a Mon Sep 17 00:00:00 2001 From: Frangu Vlad Date: Sun, 19 Aug 2018 14:37:00 +0300 Subject: [PATCH] Remove double iteration (#2773) --- src/structures/User.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/User.js b/src/structures/User.js index 1fb23d4cf..673663234 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -185,7 +185,7 @@ class User extends Base { * @readonly */ get dmChannel() { - return this.client.channels.filter(c => c.type === 'dm').find(c => c.recipient.id === this.id) || null; + return this.client.channels.find(c => c.type === 'dm' && c.recipient.id === this.id) || null; } /**