Use Array.includes instead of Array.indexOf

Co-Authored-By: sachaaaaa <40749766+sachaaaaa@users.noreply.github.com>
pull/248/head
Mikunj Varsani 6 years ago committed by GitHub
parent e953ae7be2
commit 353302ca16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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;
});
},

Loading…
Cancel
Save