timerender: Fix comparison of Date objects.

This === comparison between two Date objects added by commit
9896782fd1 (#17220) always returned
false, so the body of timerender was running every minute instead of
every day.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2021-03-04 09:23:21 -08:00 committed by Tim Abbott
parent 23b589cce3
commit 63eae63a07
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@ import {
differenceInCalendarDays,
format,
formatISO,
isEqual,
isValid,
parseISO,
startOfToday,
@ -181,7 +182,7 @@ export function render_markdown_timestamp(time, text) {
// testing purposes.
export function update_timestamps() {
const today = startOfToday();
if (today !== last_update) {
if (!isEqual(today, last_update)) {
const to_process = update_list;
update_list = [];