Back to the gallery

Code Diff

lib/format.ts
Added +3Removed −2
@@ -1,8 +1,9 @@export function formatDuration(seconds: number) {Removed:   const whole = Math.round(seconds)Added:   const whole = Math.max(1, Math.round(seconds))  if (whole < 60) return `${whole}s`  const minutes = Math.floor(whole / 60)Removed:   return `${minutes}m ${whole % 60}s`Added:   const rest = whole % 60Added:   return rest > 0 ? `${minutes}m ${rest}s` : `${minutes}m`}