diff --git a/app/assets/javascripts/admin/models/flagged-post.js.es6 b/app/assets/javascripts/admin/models/flagged-post.js.es6 index 8360b916bad..d2a9c4510f9 100644 --- a/app/assets/javascripts/admin/models/flagged-post.js.es6 +++ b/app/assets/javascripts/admin/models/flagged-post.js.es6 @@ -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; }); }, diff --git a/app/assets/javascripts/discourse/models/nav-item.js.es6 b/app/assets/javascripts/discourse/models/nav-item.js.es6 index 9493b58704a..c0b4a1f0b23 100644 --- a/app/assets/javascripts/discourse/models/nav-item.js.es6 +++ b/app/assets/javascripts/discourse/models/nav-item.js.es6 @@ -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); }