From 353302ca16691bfc85917c9ce02ba87c1fad5bdf Mon Sep 17 00:00:00 2001 From: Mikunj Varsani Date: Wed, 6 Mar 2019 14:04:00 +1100 Subject: [PATCH] Use Array.includes instead of Array.indexOf Co-Authored-By: sachaaaaa <40749766+sachaaaaa@users.noreply.github.com> --- js/models/conversations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/models/conversations.js b/js/models/conversations.js index 2079afd53..9b39f31c6 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -390,7 +390,7 @@ // Get the pending friend requests that match the direction // If no direction is supplied then return all pending friend requests return messages.models.filter(m => { - if (status.indexOf(m.get('friendStatus')) < 0) return false; + if (!status.includes(m.get('friendStatus')) return false; return direction === null || m.get('direction') === direction; }); },