From 2a4e5e3e5709aa16a48e94283e5414073ecdd741 Mon Sep 17 00:00:00 2001 From: mr21 Date: Tue, 14 Nov 2023 07:55:47 +0100 Subject: [PATCH] gswaScheduler: fix, dataUpdateBlock --- gswaScheduler/gswaScheduler.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gswaScheduler/gswaScheduler.js b/gswaScheduler/gswaScheduler.js index 24c80bd..35d20bf 100644 --- a/gswaScheduler/gswaScheduler.js +++ b/gswaScheduler/gswaScheduler.js @@ -344,12 +344,14 @@ class gswaScheduler { Object.assign( blc, obj ); this.#updateDuration(); - while ( blc.prev ) { + while ( blc?.prev ) { idToPlay = blc.prev; blc = this.data[ idToPlay ]; } - this.#blockStop( idToPlay ); - this.#blockSchedule( idToPlay ); + if ( blc ) { + this.#blockStop( idToPlay ); + this.#blockSchedule( idToPlay ); + } } }