REFACTOR: Remove `_.intersection`

This commit is contained in:
Robin Ward 2020-09-01 14:54:30 -04:00
parent 0b098566ff
commit c2cfa62000
1 changed files with 4 additions and 2 deletions

View File

@ -290,7 +290,7 @@ const User = RestModel.extend({
];
const data = this.getProperties(
fields ? _.intersection(userFields, fields) : userFields
userFields.filter(uf => !fields || fields.indexOf(uf) !== -1)
);
let userOptionFields = [
@ -326,7 +326,9 @@ const User = RestModel.extend({
];
if (fields) {
userOptionFields = _.intersection(userOptionFields, fields);
userOptionFields = userOptionFields.filter(
uo => fields.indexOf(uo) !== -1
);
}
userOptionFields.forEach(s => {