nexa-runtime 0.8.0 → 0.8.1

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.
@@ -62,10 +62,9 @@ export function mount(vnode, parent, options, anchor = null) {
62
62
  const el = createText('');
63
63
  vnode.el = el;
64
64
  if (typeof vnode.text === 'function') {
65
- const textEffect = effect(() => {
65
+ effect(() => {
66
66
  setText(el, String(vnode.text()));
67
67
  });
68
- vnode._textEffect = textEffect;
69
68
  }
70
69
  else {
71
70
  setText(el, vnode.text ?? '');
@@ -137,8 +136,7 @@ function mountChildren(vnode, parent, options, anchor = null) {
137
136
  }
138
137
  function replaceNode(oldV, newV, parent, options, anchor) {
139
138
  unmount(oldV, parent, options);
140
- const safeAnchor = (anchor && anchor.parentNode === parent) ? anchor : null;
141
- mount(newV, parent, options, safeAnchor);
139
+ mount(newV, parent, options, anchor);
142
140
  }
143
141
  function updateNode(vnode, options) {
144
142
  const { patchProp, setText } = options;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexa-runtime",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -13,7 +13,7 @@
13
13
  }
14
14
  },
15
15
  "dependencies": {
16
- "nexa-reactivity": "0.8.0"
16
+ "nexa-reactivity": "0.8.1"
17
17
  },
18
18
  "files": [
19
19
  "dist"