aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-util
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-04-21 15:38:18 -0300
committerSebastian <sebasjm@gmail.com>2022-04-21 15:38:18 -0300
commit3e3146844490d2f51695160fd3b8c179a642be9d (patch)
tree11931be5a9f1541293962c6d61c010b94a55b824 /packages/taler-util
parent64acf8e2b1083de6f78b7d21dd2701af2fee1911 (diff)
fix: was returning forever as min
Diffstat (limited to 'packages/taler-util')
-rw-r--r--packages/taler-util/src/time.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/taler-util/src/time.ts b/packages/taler-util/src/time.ts
index 695d6d274..f12e8d32b 100644
--- a/packages/taler-util/src/time.ts
+++ b/packages/taler-util/src/time.ts
@@ -292,7 +292,7 @@ export function durationMin(d1: Duration, d2: Duration): Duration {
return { d_ms: d2.d_ms };
}
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) };
}