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:
parent
484a9551d1
commit
794b06b2bd
|
@ -40,7 +40,9 @@ describe('Gesture handler', function () {
|
|||
});
|
||||
|
||||
afterEach(function () {
|
||||
handler.detach();
|
||||
if (handler) {
|
||||
handler.detach();
|
||||
}
|
||||
target = null;
|
||||
gestures = null;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue