@ -3,6 +3,10 @@ export function diffString(diff) {
}
export default function calculateDiff({program, cooldownMin = null, minutes, seconds, calories}) {
if (cooldownMin < 0) {
cooldownMin = null
const {warmupMin, warmupCpm, cpm, cooldownCpm} = program;
const actualWarmup = cooldownMin !== null && cooldownMin > 0
? Math.min(warmupMin, cooldownMin)