From c42f8bd4dd04e2abde6eca3f02fb7ccc27e0c70e Mon Sep 17 00:00:00 2001 From: Andrea Faggin Date: Fri, 26 May 2017 10:19:23 +0200 Subject: [PATCH] Fixed destroy in IE11 --- src/apis/destroy.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/apis/destroy.js b/src/apis/destroy.js index 40b347d5..cc27f499 100644 --- a/src/apis/destroy.js +++ b/src/apis/destroy.js @@ -65,7 +65,9 @@ SmoothScrollbar.prototype.destroy = function (isRemoval) { // reset content const childNodes = [...content.childNodes]; - container.innerHTML = ''; + while (container.firstChild) { + container.removeChild(container.firstChild); + } childNodes.forEach((el) => container.appendChild(el)); });