diff --git a/src/component/tooltip/TooltipHTMLContent.ts b/src/component/tooltip/TooltipHTMLContent.ts
index 7e08b53f98..27e00d63dc 100644
--- a/src/component/tooltip/TooltipHTMLContent.ts
+++ b/src/component/tooltip/TooltipHTMLContent.ts
@@ -461,10 +461,13 @@ class TooltipHTMLContent {
getSize() {
const el = this.el;
- return [el.offsetWidth, el.offsetHeight];
+ return el ? [el.offsetWidth, el.offsetHeight] : [0, 0];
}
moveTo(zrX: number, zrY: number) {
+ if (!this.el) {
+ return;
+ }
const styleCoord = this._styleCoord;
makeStyleCoord(styleCoord, this._zr, this._container, zrX, zrY);