Skip to content

Commit

Permalink
support negative durations
Browse files Browse the repository at this point in the history
  • Loading branch information
blacksmithgu committed Sep 15, 2023
1 parent 14cd5df commit 6edd384
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/normalize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export function renderMinimalDuration(dur: Duration): string {

// toHuman outputs zero quantities e.g. "0 seconds"
dur = Duration.fromObject(
Object.fromEntries(Object.entries(dur.toObject()).filter(([, quantity]) => quantity > 0))
Object.fromEntries(Object.entries(dur.toObject()).filter(([, quantity]) => quantity != 0))
);

return dur.toHuman();
Expand Down

0 comments on commit 6edd384

Please sign in to comment.