mirror of
https://github.com/novnc/noVNC.git
synced 2026-05-26 07:08:06 +00:00
Merge pull request #1834 from sbungartz/avoid-exception-when-disconnecting-after-dom-morph
Avoid exception when cursor was removed from DOM already
This commit is contained in:
@@ -69,7 +69,9 @@ export default class Cursor {
|
||||
this._target.removeEventListener('mousemove', this._eventHandlers.mousemove, options);
|
||||
this._target.removeEventListener('mouseup', this._eventHandlers.mouseup, options);
|
||||
|
||||
document.body.removeChild(this._canvas);
|
||||
if (document.contains(this._canvas)) {
|
||||
document.body.removeChild(this._canvas);
|
||||
}
|
||||
}
|
||||
|
||||
this._target = null;
|
||||
|
||||
Reference in New Issue
Block a user