From 67f2c380a329ccd05cd21602da1ec76d3f4bcf53 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sun, 9 Jun 2024 11:15:17 +0300 Subject: [PATCH] #1069 Handle string timestamps as numbers --- public/scripts/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/utils.js b/public/scripts/utils.js index f12497a6f..cfb02ed43 100644 --- a/public/scripts/utils.js +++ b/public/scripts/utils.js @@ -640,7 +640,7 @@ function parseTimestamp(timestamp) { } // Unix time (legacy TAI / tags) - if (typeof timestamp === 'number') { + if (typeof timestamp === 'number' || /^\d+$/.test(timestamp)) { if (isNaN(timestamp) || !isFinite(timestamp) || timestamp < 0) { return moment.invalid(); }