Skip to content

Commit

Permalink
BugFix:Regular Expression in parseDuration Function (louislam#5563)
Browse files Browse the repository at this point in the history
Co-authored-by: Frank Elsinga <frank@elsinga.de>
  • Loading branch information
ShiyuBanzhou and CommanderStorm authored Jan 22, 2025
1 parent 223cde8 commit 03beef8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/modules/apicache/apicache.js
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ function ApiCache() {
}

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

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

0 comments on commit 03beef8

Please sign in to comment.