Skip to content

Commit

Permalink
Fixed destroy in IE11 (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
zsavajji authored and idiotWu committed May 26, 2017
1 parent 960ebf7 commit 29749dd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/apis/destroy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
});
Expand Down

0 comments on commit 29749dd

Please sign in to comment.