diff --git a/core/util/cursor.js b/core/util/cursor.js index 35358136..99fe502d 100644 --- a/core/util/cursor.js +++ b/core/util/cursor.js @@ -64,6 +64,10 @@ export default class Cursor { } detach() { + if (!this._target) { + return; + } + if (useFallback) { const options = { capture: true, passive: true }; this._target.removeEventListener('mouseover', this._eventHandlers.mouseover, options);