fix the bug of regex

This commit is contained in:
DayShift 2025-01-20 19:32:34 +08:00 committed by GitHub
parent b3d6d45122
commit e1de3cf0cc
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") {
let split = duration.match(/^([\d\.,]+)(?!\1)\s?((?:(?!\d)\w)+)$/);
let split = duration.match(/^([\d\.,]+)\s?((?:(?!\d)\w)+)$/);
if (split.length === 3) {
let len = parseFloat(split[1]);