Skip to content

Commit

Permalink
Merge pull request #28 from tilde-nlp/bugfix/72197
Browse files Browse the repository at this point in the history
Bugfix/72197
  • Loading branch information
davisrtilde authored Jul 29, 2024
2 parents 7211042 + e5dbfd4 commit 4c5bd1c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/polyfills/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,13 @@ if (!Element.prototype.closest) {
constructor.prototype.children == null) {
Object.defineProperty(constructor.prototype, 'children', {
get: function() {
let i = 0, node, nodes = this.childNodes, children = [];
let nodes = [];
try {
nodes = this.childNodes;
} catch (error) {
console.log(error);
}
let i = 0, node, children = [];
while (node = nodes[i++]) {
if (node.nodeType === 1) {
children.push(node);
Expand Down

0 comments on commit 4c5bd1c

Please sign in to comment.