diff --git a/lib/units.ts b/lib/units.ts index 082d363..fdc7546 100644 --- a/lib/units.ts +++ b/lib/units.ts @@ -104,6 +104,11 @@ export function convertUnit( const isToTempo = toUnit in tempoUnits; if (isFromTempo && isToTempo) { + // Same unit - no conversion needed + if (fromUnit === toUnit) { + return value; + } + const fromAnchor = tempoUnits[fromUnit as keyof typeof tempoUnits].to_anchor; const toAnchor = tempoUnits[toUnit as keyof typeof tempoUnits].to_anchor;