mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
#1069 Handle string timestamps as numbers
This commit is contained in:
@ -640,7 +640,7 @@ function parseTimestamp(timestamp) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Unix time (legacy TAI / tags)
|
// Unix time (legacy TAI / tags)
|
||||||
if (typeof timestamp === 'number') {
|
if (typeof timestamp === 'number' || /^\d+$/.test(timestamp)) {
|
||||||
if (isNaN(timestamp) || !isFinite(timestamp) || timestamp < 0) {
|
if (isNaN(timestamp) || !isFinite(timestamp) || timestamp < 0) {
|
||||||
return moment.invalid();
|
return moment.invalid();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user