Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function postpatch(_, nextNode) {
try {
const component = nextNode.data.component
if (nextNode.flushId) {
getApp().eventHub.emitAsync(EventType.COMPONENT_UPDATE, {
componentId: component.componentId,
componentInstanceId: component.componentInstanceId,
name: component.name,
flushId: component.flushId,
paths: Array.from(component.tree.pathDependencies) as any,
})
}
} catch (error) {
console.log(error.message)
}
}
componentDidUpdate() {
if (this.isUpdating) {
this.overmind.eventHub.emitAsync(EventType.COMPONENT_UPDATE, {
componentId: populatedComponent.__componentId,
componentInstanceId: this.componentInstanceId,
name,
flushId: this.currentFlushId,
paths: Array.from(this.tree.pathDependencies as Set),
});
this.isUpdating = false;
}
}
componentWillUnmount() {
componentDidUpdate() {
if (this.isUpdating) {
this.overmind.eventHub.emitAsync(EventType.COMPONENT_UPDATE, {
componentId: populatedComponent.__componentId,
componentInstanceId: this.componentInstanceId,
name,
flushId: this.currentFlushId,
paths: Array.from(this.tree.pathDependencies as Set),
})
this.isUpdating = false
}
}
componentWillUnmount() {
updated(this: any) {
if (overmind.mode.mode === MODE_SSR) return
this[OVERMIND].tree.stopTracking()
if (this[OVERMIND].isUpdating) {
overmind.eventHub.emitAsync(EventType.COMPONENT_UPDATE, {
componentId,
componentInstanceId: this[OVERMIND].componentInstanceId,
name: this.$options.name || '',
flushId: this[OVERMIND].currentFlushId,
paths: Array.from(this[OVERMIND].tree.pathDependencies) as any,
})
this[OVERMIND].isUpdating = false
}
},
}),
;(window['__zone_symbol__setTimeout'] || setTimeout)(() => {
this.overmind.eventHub.emitAsync(EventType.COMPONENT_UPDATE, {
componentId: this.componentDetails.componentId,
componentInstanceId: this.componentDetails.componentInstanceId,
name: this.componentDetails.name,
paths: Array.from(this.tree.pathDependencies) as any,
flushId,
})
})
}