mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-14 11:53:49 +00:00
refactor: offset cannot be null
This commit is contained in:
committed by
Carlos Valente
parent
e90e94828d
commit
938c5fbb4c
@@ -299,10 +299,10 @@ export const updateRoll = (state: RuntimeState) => {
|
||||
* Positive offset is time ahead
|
||||
* Negative offset is time delayed
|
||||
*/
|
||||
export function getRuntimeOffset(state: RuntimeState): MaybeNumber {
|
||||
export function getRuntimeOffset(state: RuntimeState): number {
|
||||
// nothing to calculate if there are no loaded events or if we havent started
|
||||
if (state.eventNow === null || state.runtime.actualStart === null) {
|
||||
return null;
|
||||
return 0;
|
||||
}
|
||||
|
||||
const { clock } = state;
|
||||
|
||||
Reference in New Issue
Block a user