diff --git a/src/polyfills/custom.js b/src/polyfills/custom.js index 4779432..fe456f9 100644 --- a/src/polyfills/custom.js +++ b/src/polyfills/custom.js @@ -79,12 +79,12 @@ if (!Element.prototype.closest) { constructor.prototype.children == null) { Object.defineProperty(constructor.prototype, 'children', { get: function() { - let nodes = []; - try { - nodes = this.childNodes; - } catch(error) { - console.log(error); - } + let nodes = []; + try { + nodes = this.childNodes; + } catch(error) { + console.log(error); + } let i = 0, node, children = []; while (node = nodes[i++]) { if (node.nodeType === 1) {