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 @@ -202,32 +202,31 @@ function preserveOrReplaceNowTimesInObjects(
202202}
203203
204204function logAnyRemainingNowTimes ( _context : JobContext , timelineObjs : Array < TimelineObjGeneric > ) : void {
205- const ids : string [ ] = [ ]
206-
207- const hasNow = ( obj : TimelineEnableExt | TimelineEnableExt [ ] ) => {
208- let res = false
209- applyToArray ( obj , ( enable ) => {
210- if ( enable . start === 'now' || enable . end === 'now' ) res = true
211- } )
212- return res
213- }
205+ const badTimelineObjs : any [ ] = [ ]
214206
215207 for ( const obj of timelineObjs ) {
216208 if ( hasNow ( obj . enable ) ) {
217- ids . push ( obj . id )
209+ badTimelineObjs . push ( obj )
218210 }
219211
220212 for ( const kf of obj . keyframes || [ ] ) {
221213 if ( hasNow ( kf . enable ) ) {
222- ids . push ( kf . id )
214+ badTimelineObjs . push ( kf )
223215 }
224216 }
225217 }
226218
227- if ( ids . length ) {
228- logger . error ( `Some timeline objects have unexpected now times!: ${ JSON . stringify ( ids ) } ` )
219+ if ( badTimelineObjs . length ) {
220+ logger . error ( `Some timeline objects have unexpected now times!: ${ JSON . stringify ( badTimelineObjs ) } ` )
229221 }
230222}
223+ function hasNow ( obj : TimelineEnableExt | TimelineEnableExt [ ] ) {
224+ let res = false
225+ applyToArray ( obj , ( enable ) => {
226+ if ( enable . start === 'now' || enable . end === 'now' ) res = true
227+ } )
228+ return res
229+ }
231230
232231/** Store the timelineobjects into the model, and perform any post-save actions */
233232export function saveTimeline (
You can’t perform that action at this time.
0 commit comments