Skip to content

Commit

Permalink
fix: don't rely on live collections (mozilla#677)
Browse files Browse the repository at this point in the history
  • Loading branch information
eordano authored Mar 3, 2021
1 parent 2b9a68e commit b67027d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Readability.js
Original file line number Diff line number Diff line change
Expand Up @@ -1246,9 +1246,8 @@ Readability.prototype = {
var div = doc.createElement("DIV");
div.id = "readability-page-1";
div.className = "page";
var children = articleContent.childNodes;
while (children.length) {
div.appendChild(children[0]);
while (articleContent.firstChild) {
div.appendChild(articleContent.firstChild);
}
articleContent.appendChild(div);
}
Expand Down

0 comments on commit b67027d

Please sign in to comment.