From 1265a5f7c0ddb54b7368f6806814b97df7c27c57 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Tue, 1 Sep 2020 14:16:27 -0400 Subject: [PATCH] REFACTOR: Remove `_.max` --- app/assets/javascripts/discourse/app/controllers/topic.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/controllers/topic.js b/app/assets/javascripts/discourse/app/controllers/topic.js index 07cfe1ade9d..5aaeb4aa19c 100644 --- a/app/assets/javascripts/discourse/app/controllers/topic.js +++ b/app/assets/javascripts/discourse/app/controllers/topic.js @@ -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()); }