Skip to content

Commit 03beef8

Browse files
BugFix:Regular Expression in parseDuration Function (louislam#5563)
Co-authored-by: Frank Elsinga <[email protected]>
1 parent 223cde8 commit 03beef8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/modules/apicache/apicache.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ function ApiCache() {
485485
}
486486

487487
if (typeof duration === "string") {
488-
let split = duration.match(/^([\d\.,]+)\s?(\w+)$/);
488+
let split = duration.match(/^([\d\.,]+)\s?([a-zA-Z]+)$/);
489489

490490
if (split.length === 3) {
491491
let len = parseFloat(split[1]);

0 commit comments

Comments
 (0)