REFACTOR: Remove `_.max`

This commit is contained in:
Robin Ward 2020-09-01 14:16:27 -04:00
parent d06deb0c4f
commit 1265a5f7c0
1 changed files with 1 additions and 1 deletions

View File

@ -1445,7 +1445,7 @@ export default Controller.extend(bufferedProperty("model"), {
this.currentUser.automatically_unpin_topics
) {
// automatically unpin topics when the user reaches the bottom
const max = _.max(postNumbers);
const max = Math.max(...postNumbers);
if (topic.get("pinned") && max >= topic.get("highest_post_number")) {
next(() => topic.clearPin());
}