From bb58ab98e3652dc2c5916f42c321a272fbf1c317 Mon Sep 17 00:00:00 2001 From: DanielApt Date: Fri, 27 Mar 2015 18:28:51 +0000 Subject: [PATCH] Fix failing test --- src/js/lib/dom.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/lib/dom.js b/src/js/lib/dom.js index 8d6b4fa..40f56fd 100644 --- a/src/js/lib/dom.js +++ b/src/js/lib/dom.js @@ -70,6 +70,8 @@ exports.remove = function (element) { if (typeof element.remove !== 'undefined') { element.remove(); } else { - element.parentNode && element.parentNode.removeChild(element); + if (element.parentNode) { + element.parentNode.removeChild(element); + } } };