Skip to content

Commit ff33c99

Browse files
awgeorgeacinader
authored andcommitted
Use ES6 code
1 parent 1420df7 commit ff33c99

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Controllers/DatabaseController.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,9 +1439,7 @@ class DatabaseController {
14391439
[...(auth.userRoles || [])].forEach(role => {
14401440
const fields = protectedFields[role];
14411441
if (fields) {
1442-
protectedKeys = protectedKeys.filter(
1443-
value => -1 !== fields.indexOf(value)
1444-
);
1442+
protectedKeys = protectedKeys.filter(v => fields.includes(v));
14451443
}
14461444
});
14471445

0 commit comments

Comments
 (0)