REFACTOR: Remove `_.max`

REFACTOR: Remove _.max

diff --git a/app/assets/javascripts/discourse/app/controllers/topic.js b/app/assets/javascripts/discourse/app/controllers/topic.js
index 07cfe1a..5aaeb4a 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());
         }

GitHub sha: 1265a5f7

This commit appears in #10566 which was merged by eviltrout.