REFACTOR: Remove `_.intersection`
This commit is contained in:
parent
0b098566ff
commit
c2cfa62000
|
@ -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 => {
|
||||
|
|
Loading…
Reference in New Issue