From 1dc09768f833f56b799ee156b970a8b2fc113208 Mon Sep 17 00:00:00 2001 From: skie1997 Date: Thu, 26 Oct 2023 17:39:34 +0800 Subject: [PATCH] fix: reconfig judge logic --- packages/vchart/src/core/vchart.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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,