Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_.each(timelineObjs, obj => {
// ignore normal objects
if (obj.content.type !== TimelineContentTypeHttp.POST) return
if (!obj.isBackground) return
const obj2 = obj as TimelineObjHTTPRequest & TimelineObjGeneric
if (obj2.content.params && obj2.content.params.template && (obj2.content.params.template).event === 'take') {
(obj2.content.params.template).event = 'cue'
} else {
// something we don't understand, so dont lookahead on it
toRemoveIds.push(obj._id)
}
})