File tree Expand file tree Collapse file tree 1 file changed +12
-13
lines changed
packages/job-worker/src/playout/timeline Expand file tree Collapse file tree 1 file changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -201,32 +201,31 @@ function preserveOrReplaceNowTimesInObjects(
201201}
202202
203203function logAnyRemainingNowTimes ( _context : JobContext , timelineObjs : Array < TimelineObjGeneric > ) : void {
204- const ids : string [ ] = [ ]
205-
206- const hasNow = ( obj : TimelineEnableExt | TimelineEnableExt [ ] ) => {
207- let res = false
208- applyToArray ( obj , ( enable ) => {
209- if ( enable . start === 'now' || enable . end === 'now' ) res = true
210- } )
211- return res
212- }
204+ const badTimelineObjs : any [ ] = [ ]
213205
214206 for ( const obj of timelineObjs ) {
215207 if ( hasNow ( obj . enable ) ) {
216- ids . push ( obj . id )
208+ badTimelineObjs . push ( obj )
217209 }
218210
219211 for ( const kf of obj . keyframes || [ ] ) {
220212 if ( hasNow ( kf . enable ) ) {
221- ids . push ( kf . id )
213+ badTimelineObjs . push ( kf )
222214 }
223215 }
224216 }
225217
226- if ( ids . length ) {
227- logger . error ( `Some timeline objects have unexpected now times!: ${ JSON . stringify ( ids ) } ` )
218+ if ( badTimelineObjs . length ) {
219+ logger . error ( `Some timeline objects have unexpected now times!: ${ JSON . stringify ( badTimelineObjs ) } ` )
228220 }
229221}
222+ function hasNow ( obj : TimelineEnableExt | TimelineEnableExt [ ] ) {
223+ let res = false
224+ applyToArray ( obj , ( enable ) => {
225+ if ( enable . start === 'now' || enable . end === 'now' ) res = true
226+ } )
227+ return res
228+ }
230229
231230/** Store the timelineobjects into the model, and perform any post-save actions */
232231export function saveTimeline (
You can’t perform that action at this time.
0 commit comments