domql 1.5.2 → 1.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "DOM rendering Javascript framework at early stage.",
4
4
  "private": false,
5
5
  "author": "rackai",
6
- "version": "1.5.2",
6
+ "version": "1.5.3",
7
7
  "repository": "https://github.com/rackai/domql",
8
8
  "publishConfig": {
9
9
  "registry": "https://registry.npmjs.org"
@@ -56,8 +56,7 @@ const create = (element, parent, key, options = {}) => {
56
56
  }
57
57
  }
58
58
 
59
- // create EXTENDal inheritance
60
-
59
+ // create EXTEND inheritance
61
60
  applyExtend(element, parent, options)
62
61
 
63
62
  if (Object.keys(options).length) {
@@ -12,8 +12,9 @@ const removeContentElement = (params, element) => {
12
12
  }
13
13
 
14
14
  if (element.__cached && element.__cached.content) {
15
+ console.log(element.__cached.content)
15
16
  if (element.__cached.content.tag === 'fragment') element.__cached.content.parent.node.innerHTML = ''
16
- else element.__cached.content.remove()
17
+ else if (element.__cached.content) element.__cached.content?.remove()
17
18
  }
18
19
 
19
20
  delete element.content
@@ -45,6 +45,7 @@ export default function (element, parent) {
45
45
  state.__element = element
46
46
  state.parse = parseState
47
47
  state.update = updateState
48
+ state.parent = element.parent.state
48
49
 
49
50
  // run `on.stateCreated`
50
51
  if (element.on && isFunction(element.on.stateCreated)) {