From 6d392089e4dac40c35ca07594c5fab66e5b212d6 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 9 May 2017 14:52:07 -0400 Subject: [PATCH] fixes #5660 - https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.1 --- public/src/client/topic/postTools.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/src/client/topic/postTools.js b/public/src/client/topic/postTools.js index 8bbda4d79c..707a9a5b0f 100644 --- a/public/src/client/topic/postTools.js +++ b/public/src/client/topic/postTools.js @@ -367,7 +367,8 @@ define('forum/topic/postTools', [ } function showStaleWarning(callback) { - if (staleReplyAnyway || ajaxify.data.lastposttime >= (Date.now() - (1000 * 60 * 60 * 24 * ajaxify.data.topicStaleDays))) { + var staleThreshold = Math.min(Date.now() - (1000 * 60 * 60 * 24 * ajaxify.data.topicStaleDays), 8640000000000000); + if (staleReplyAnyway || ajaxify.data.lastposttime >= staleThreshold) { return callback(); }