mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-01-23 23:13:42 -06:00
BugFix:Regular Expression in parseDuration Function (#5563)
Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
parent
223cde831f
commit
03beef8006
@ -485,7 +485,7 @@ function ApiCache() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (typeof duration === "string") {
|
if (typeof duration === "string") {
|
||||||
let split = duration.match(/^([\d\.,]+)\s?(\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]);
|
||||||
|
Loading…
Reference in New Issue
Block a user