This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch fix/tooltip-dispose-NPE in repository https://gitbox.apache.org/repos/asf/echarts.git
commit 61e22c33ce44867282c4fd475a335bb8b3488cc6 Author: plainheart <[email protected]> AuthorDate: Wed Nov 1 19:04:22 2023 +0800 fix(tooltip): use `remove` rather than `parentNode.removeChild` to fix potential NPE when its parent node doesn't exists. (apache/echarts#19248) --- src/component/tooltip/TooltipHTMLContent.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/component/tooltip/TooltipHTMLContent.ts b/src/component/tooltip/TooltipHTMLContent.ts index da1960835..cc6ef51c5 100644 --- a/src/component/tooltip/TooltipHTMLContent.ts +++ b/src/component/tooltip/TooltipHTMLContent.ts @@ -520,7 +520,7 @@ class TooltipHTMLContent { } dispose() { - this.el.parentNode.removeChild(this.el); + this.el.remove(); this.el = this._container = null; } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
