fix: handle 2-part version strings in isNewer (NaN comparison bug)
All checks were successful
Build & Release / build (push) Successful in 2m56s
All checks were successful
Build & Release / build (push) Successful in 2m56s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c828a6af47
commit
6ada11778a
1 changed files with 1 additions and 1 deletions
|
|
@ -107,7 +107,7 @@ function notify(title: string, body: string) {
|
|||
}
|
||||
|
||||
function isNewer(latest: string, current: string): boolean {
|
||||
const parse = (v: string) => v.split(".").map(Number);
|
||||
const parse = (v: string) => v.split(".").map(p => Number(p) || 0);
|
||||
const [lA, lB, lC] = parse(latest);
|
||||
const [cA, cB, cC] = parse(current);
|
||||
if (lA !== cA) return lA > cA;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue