Update server/modules/apicache/apicache.js

modified the regular term matching rule

Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
DayShift 2025-01-22 22:55:09 +08:00 committed by GitHub
parent 282bfb6c11
commit 6248ff1c5d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -485,7 +485,7 @@ function ApiCache() {
} }
if (typeof duration === "string") { if (typeof duration === "string") {
let split = duration.match(/^([\d\.,]+)\s?((?:(?!\d)\w)+)$/); let split = duration.match(/^([\d\.,]+)\s?([a-zA-Z]+)$/);
if (split.length === 3) { if (split.length === 3) {
let len = parseFloat(split[1]); let len = parseFloat(split[1]);