From c28a761710258de287b26eec0810f8d7a0b8c5e3 Mon Sep 17 00:00:00 2001 From: Joseph Schmitt Date: Mon, 8 May 2017 20:23:51 -0400 Subject: [PATCH] Fix JS error when DOM element not found --- lib/app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/app.js b/lib/app.js index 6cff967f..798334bd 100644 --- a/lib/app.js +++ b/lib/app.js @@ -994,7 +994,8 @@ mixins.manageState = { function getViewSel (el) { el = window.Dom7(el.target || el).parents('.view') return (el.attr('id') !== '' && el.attr('id') !== null ? '#' + el.attr('id') : '') + - (el[0].classList.length > 0 ? '.' + el[0].classList.value.replace(/ /g, '.') : '') + (el.length && el[0].classList.length > 0 ? '.' + + el[0].classList.value.replace(/ /g, '.') : ''); } function getViewUrl (el) { let viewSel = getViewSel(el)