From bbc06459e9862b5124ebefd3ff2181aadf80f617 Mon Sep 17 00:00:00 2001 From: Ethan Martin Date: Wed, 3 Oct 2018 13:01:00 -0400 Subject: [PATCH] Only divert href to app if there is an href for an anchor tag. --- src/Elm/Kernel/VirtualDom.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Elm/Kernel/VirtualDom.js b/src/Elm/Kernel/VirtualDom.js index 414a820..6475c43 100644 --- a/src/Elm/Kernel/VirtualDom.js +++ b/src/Elm/Kernel/VirtualDom.js @@ -455,7 +455,7 @@ function _VirtualDom_render(vNode, eventNode) ? _VirtualDom_doc.createElementNS(vNode.__namespace, vNode.__tag) : _VirtualDom_doc.createElement(vNode.__tag); - if (_VirtualDom_divertHrefToApp && vNode.__tag == 'a') + if (_VirtualDom_divertHrefToApp && vNode.__tag == 'a' && typeof vNode.d.href !== 'undefined') { domNode.addEventListener('click', _VirtualDom_divertHrefToApp(domNode)); }