Skip to content

Commit 888e726

Browse files
author
Graham Butler
committed
fix transformChild bug and version bump @1.0.6
1 parent 2284fdd commit 888e726

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@author.io/element-control",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"description": "author-control custom element (web component).",
55
"main": "dist/author-control.min.js",
66
"scripts": {

src/element.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,15 @@ class AuthorFormControlElement extends AuthorBaseElement(HTMLElement) {
232232
})
233233

234234
this.UTIL.monitorChildren((mutations, observer) => {
235-
let filtered = mutations.filter(record => record.addedNodes.item(0).nodeType !== 3)
235+
let filtered = mutations.filter(record => {
236+
let node = record.addedNodes.item(0)
237+
238+
if (!node) {
239+
return false
240+
}
241+
242+
return node.nodeType !== 3
243+
})
236244

237245
filtered.forEach((record, index, array) => {
238246
let node = record.addedNodes.item(0)

0 commit comments

Comments
 (0)