mirror of
https://github.com/novnc/noVNC.git
synced 2026-05-26 23:19:41 +00:00
Don't detach handler if it doesn't exist
If the beforeEach() step has been skipped then there won't be anything here to detach.
This commit is contained in:
@@ -40,7 +40,9 @@ describe('Gesture handler', function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
handler.detach();
|
||||
if (handler) {
|
||||
handler.detach();
|
||||
}
|
||||
target = null;
|
||||
gestures = null;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user