Merge pull request #309 from DanielApt/remove-patch
Check if parentNode exists
This commit is contained in:
commit
a5aab04264
@ -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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user