Skip to content

Commit

Permalink
Merge pull request mdbootstrap#309 from DanielApt/remove-patch
Browse files Browse the repository at this point in the history
Check if parentNode exists
  • Loading branch information
Jun committed Apr 8, 2015
2 parents c21cfb6 + aca7683 commit a5aab04
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/js/lib/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ exports.remove = function (element) {
if (typeof element.remove !== 'undefined') {
element.remove();
} else {
element.parentNode.removeChild(element);
if (element.parentNode) {
element.parentNode.removeChild(element);
}
}
};

0 comments on commit a5aab04

Please sign in to comment.