Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let now = getCurrentTimeReactive()
try {
// These properties will be exposed under this.props
// Note that these properties are reactively recalculated
let timeline = transformTimeline(
Timeline.find({
studioId: props.studioId
}, { sort: { _id: 1 } }).fetch()
)
// console.log('rerun')
// TODO - dont repeat unless changed
let tl = Resolver.resolveTimeline(timeline, { time: now })
let allStates = Resolver.resolveAllStates(tl)
let state = Resolver.getState(allStates, now)
return {
now: now,
state: state
}
} catch (e) {
return {
now: now,
errorMsg: `Failed to update timeline:\n${e}`
}
}
})(
class extends MeteorReactComponent {