mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2024-11-08 09:14:10 +01:00
Make Cursor.detach() safe to call when not attached
Avoids having checks in higher layers.
This commit is contained in:
parent
a850be4afa
commit
12cdad066e
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user