Proper null check on removeChild

Fixing an error I was seeing: Cannot read property 'removeChild' of null
pull/562/head
Jordy van den Aardweg 5 years ago committed by GitHub
parent b551f1cf6e
commit 3ca9692c01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -706,7 +706,9 @@ Readability.prototype = {
_removeAndGetNext: function(node) {
var nextNode = this._getNextNode(node, true);
node.parentNode.removeChild(node);
if (node.parentNode) {
node.parentNode.removeChild(node);
}
return nextNode;
},

Loading…
Cancel
Save