From 6794798548360fd255188b3f9d385139b223507c Mon Sep 17 00:00:00 2001 From: Denny Biasiolli Date: Tue, 25 Oct 2016 10:52:47 +0200 Subject: [PATCH] fix(tests): fixing errors caused by commit 417997d --- js/utils/tap.js | 2 +- test/unit/utils/tap.unit.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/utils/tap.js b/js/utils/tap.js index 1b48f411198..74520d46411 100644 --- a/js/utils/tap.js +++ b/js/utils/tap.js @@ -486,7 +486,7 @@ function tapIgnoreEvent(e) { return true; } - if(e.target.tagName == 'SELECT') { + if(e.target && e.target.tagName == 'SELECT') { return true; } diff --git a/test/unit/utils/tap.unit.js b/test/unit/utils/tap.unit.js index 56a191d0f4f..2c53038f514 100644 --- a/test/unit/utils/tap.unit.js +++ b/test/unit/utils/tap.unit.js @@ -446,7 +446,7 @@ describe('Ionic Tap', function() { preventDefault:function(){ this.preventedDefault = true; } }; tapTouchEnd(e); - expect( e.preventedDefault ).toEqual(true); + expect( e.preventedDefault ).toBeUndefined(); e = { target: document.createElement('div'), @@ -526,7 +526,7 @@ describe('Ionic Tap', function() { stopPropagation: function(){ this.stoppedPropagation = true; } }; tapMouseDown(e); - expect( e.stoppedPropagation ).toEqual(true); + expect( e.stoppedPropagation ).toBeUndefined(); expect( e.defaultedPrevented ).toBeUndefined(); e = {