mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-20 21:41:32 +01:00
#1069 Handle string timestamps as numbers
This commit is contained in:
parent
4e822eeebb
commit
67f2c380a3
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user