diff --git a/packages/vchart/src/core/vchart.ts b/packages/vchart/src/core/vchart.ts index e1220f0b73..ffe3725337 100644 --- a/packages/vchart/src/core/vchart.ts +++ b/packages/vchart/src/core/vchart.ts @@ -990,7 +990,8 @@ export class VChart implements IVChart { on(eType: EventType, query: EventQuery, handler: EventCallback): void; on(eType: EventType, query: EventQuery | EventCallback, handler?: EventCallback): void { if (!this._userEvents) { - this._userEvents = []; + // userEvents正常情况下有默认值,如果!userEvents,说明此时chart被release了,就可以终止流程 + return; } this._userEvents.push({ eType,