mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-17 13:23:35 +00:00
refactor: invert offset
This commit is contained in:
committed by
Carlos Valente
parent
8b5034efbf
commit
8da8a08464
@@ -38,10 +38,5 @@ export function getOffsetText(offset: MaybeNumber): string {
|
||||
if (offset === null) {
|
||||
return enDash;
|
||||
}
|
||||
const isAhead = offset <= 0;
|
||||
let offsetText = millisToString(Math.abs(offset), { fallback: enDash });
|
||||
if (offsetText !== enDash) {
|
||||
offsetText = isAhead ? `+${offsetText}` : `${enDash}${offsetText}`;
|
||||
}
|
||||
return offsetText;
|
||||
return millisToString(offset, { fallback: enDash });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user