DEV: removes _.some from codebase (#6627)

This commit is contained in:
Joffrey JAFFEUX
2018-11-19 12:32:51 +01:00
committed by GitHub
parent e860c8b844
commit 0a8227d19c
2 changed files with 3 additions and 2 deletions

View File

@@ -24,7 +24,8 @@ export default Post.extend({
return false;
}
lastRevisedAt = Date.parse(lastRevisedAt);
return _.some(this.get("post_actions"), function(postAction) {
const postActions = this.get("post_actions") || [];
return postActions.some(postAction => {
return Date.parse(postAction.created_at) < lastRevisedAt;
});
},

View File

@@ -163,7 +163,7 @@ NavItem.reopenClass({
if (
args.filterMode &&
!_.some(items, i => i.indexOf(args.filterMode) !== -1)
!items.some(i => i.indexOf(args.filterMode) !== -1)
) {
items.push(args.filterMode);
}