From 3cbda1cf12cb444e0c0a2938429000466755a79d Mon Sep 17 00:00:00 2001 From: Aparajit Raghavan Date: Wed, 2 Aug 2017 22:56:30 +0000 Subject: [PATCH] Check if parentNode exists before removing element. If the swipe event fires twice for a node, the first event would have already removed the node from the parent. --- dist/swiped.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/swiped.js b/dist/swiped.js index 93246ac..827a957 100644 --- a/dist/swiped.js +++ b/dist/swiped.js @@ -345,7 +345,7 @@ } }); - if (isRemoveNode) { + if (isRemoveNode && this.elem.parentNone) { this.elem.parentNode.removeChild(this.elem); } };