Skip to content

Commit

Permalink
use for ... of
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitchdev committed May 20, 2024
1 parent 937bb1b commit f709e19
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions assets/chat/js/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,16 @@ class ChatUser {
}

hasAnyFeatures(...features) {
for (let i = 0; i < features.length; i++) {
if (this.features.includes(features[i])) return true;
for (const feature of features) {
if (this.features.includes(feature)) return true;
}

return false;
}

hasAnyRoles(...roles) {
for (let i = 0; i < roles.length; i++) {
if (this.roles.includes(roles[i])) return true;
for (const role of roles) {
if (this.roles.includes(role)) return true;
}

return false;
Expand Down

0 comments on commit f709e19

Please sign in to comment.