From b76844e5863dd20ecc77b4b159cfb4719975ea6a Mon Sep 17 00:00:00 2001 From: Iulian Meghea Date: Mon, 14 Jan 2019 10:56:42 +0200 Subject: [PATCH 1/2] Fix element type check in _onTap --- cosmoz-data-nav.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cosmoz-data-nav.js b/cosmoz-data-nav.js index 2f7a39d..d6df8ce 100644 --- a/cosmoz-data-nav.js +++ b/cosmoz-data-nav.js @@ -693,7 +693,7 @@ return; } let inBetween = path.slice(path.indexOf(selectEl)), - ancestorNav = inBetween.find(e => e.is && e.is === this.is), + ancestorNav = inBetween.find(({constructor: {is} = {}}) => is === this.constructor.is), select; if (ancestorNav !== this) { From e6a4c9f23727b16c7770f9ea58a8deba6737b5c8 Mon Sep 17 00:00:00 2001 From: Iulian Meghea Date: Mon, 14 Jan 2019 11:09:17 +0200 Subject: [PATCH 2/2] Fixes es6 --- cosmoz-data-nav.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cosmoz-data-nav.js b/cosmoz-data-nav.js index d6df8ce..ceaa5ba 100644 --- a/cosmoz-data-nav.js +++ b/cosmoz-data-nav.js @@ -693,7 +693,7 @@ return; } let inBetween = path.slice(path.indexOf(selectEl)), - ancestorNav = inBetween.find(({constructor: {is} = {}}) => is === this.constructor.is), + ancestorNav = inBetween.find(e => e && e.constructor && e.constructor.is === this.constructor.is), select; if (ancestorNav !== this) {