mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-17 21:24:11 +00:00
refactor: cleanup store (#727)
* refactor: isolate clock * refactor: isolate private * refactor: remove duplicate * chore: rename loaded > runtime * fix: handle no events loaded
This commit is contained in:
@@ -66,7 +66,7 @@ export class EventLoader {
|
||||
* finds the previous event
|
||||
* @return {object | undefined}
|
||||
*/
|
||||
static findPrevious(currentEventId: string | null): OntimeEvent | null {
|
||||
static findPrevious(currentEventId?: string): OntimeEvent | null {
|
||||
const timedEvents = EventLoader.getPlayableEvents();
|
||||
if (!timedEvents || !timedEvents.length) {
|
||||
return null;
|
||||
@@ -87,7 +87,7 @@ export class EventLoader {
|
||||
* finds the next event
|
||||
* @return {object | undefined}
|
||||
*/
|
||||
static findNext(currentEventId: string | null): OntimeEvent | null {
|
||||
static findNext(currentEventId?: string): OntimeEvent | null {
|
||||
const timedEvents = EventLoader.getPlayableEvents();
|
||||
if (!timedEvents || !timedEvents.length) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user