diff --git a/kasmweb/core/util/cursor.js b/kasmweb/core/util/cursor.js index 3535813..99fe502 100644 --- a/kasmweb/core/util/cursor.js +++ b/kasmweb/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);