fix: was returning forever as min

This commit is contained in:
Sebastian 2022-04-21 15:38:18 -03:00
parent 64acf8e2b1
commit 3e31468444
No known key found for this signature in database
GPG Key ID: BE4FF68352439FC1

View File

@ -292,7 +292,7 @@ export function durationMin(d1: Duration, d2: Duration): Duration {
return { d_ms: d2.d_ms }; return { d_ms: d2.d_ms };
} }
if (d2.d_ms === "forever") { if (d2.d_ms === "forever") {
return { d_ms: d2.d_ms }; return { d_ms: d1.d_ms };
} }
return { d_ms: Math.min(d1.d_ms, d2.d_ms) }; return { d_ms: Math.min(d1.d_ms, d2.d_ms) };
} }