mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
REFACTOR: Remove _.max
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user