juxscript 1.0.119 → 1.0.120

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.
@@ -24,8 +24,10 @@ export class ElementSkin extends BaseSkin {
24
24
  }
25
25
  updateSkin(state) {
26
26
  // 1. Tag Replacement Logic (uses state.tag)
27
- if (this.root) {
28
- const newRoot = document.createElement(state.tag.toLowerCase());
27
+ const currentTag = this.root ? this.root.tagName.toLowerCase() : '';
28
+ const desiredTag = (state.tag || 'div').toLowerCase();
29
+ if (this.root && currentTag !== desiredTag) {
30
+ const newRoot = document.createElement(desiredTag);
29
31
  if (this.root.parentNode) {
30
32
  this.root.parentNode.replaceChild(newRoot, this.root);
31
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "juxscript",
3
- "version": "1.0.119",
3
+ "version": "1.0.120",
4
4
  "type": "module",
5
5
  "description": "A JavaScript UX authorship platform",
6
6
  "main": "./index.js",