@unhead/shared 1.3.0 → 1.3.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.
package/dist/index.cjs CHANGED
@@ -480,15 +480,15 @@ async function normaliseTag(tagName, input, e) {
480
480
  tag.innerHTML = input;
481
481
  return tag;
482
482
  }
483
- tag.props = await normaliseProps(tagName, { ...input });
484
- if (tag.props.body) {
485
- tag.tagPosition = "bodyClose";
486
- delete tag.props.body;
483
+ if (input.body) {
484
+ input.tagPosition = "bodyClose";
485
+ delete input.body;
487
486
  }
488
- if (tag.props.children) {
489
- tag.props.innerHTML = tag.props.children;
490
- delete tag.props.children;
487
+ if (input.children) {
488
+ input.innerHTML = input.children;
489
+ delete input.children;
491
490
  }
491
+ tag.props = await normaliseProps(tagName, { ...input });
492
492
  Object.keys(tag.props).filter((k) => TagConfigKeys.includes(k)).forEach((k) => {
493
493
  if (!["innerHTML", "textContent"].includes(k) || TagsWithInnerContent.includes(tag.tag)) {
494
494
  tag[k] = tag.props[k];
package/dist/index.mjs CHANGED
@@ -478,15 +478,15 @@ async function normaliseTag(tagName, input, e) {
478
478
  tag.innerHTML = input;
479
479
  return tag;
480
480
  }
481
- tag.props = await normaliseProps(tagName, { ...input });
482
- if (tag.props.body) {
483
- tag.tagPosition = "bodyClose";
484
- delete tag.props.body;
481
+ if (input.body) {
482
+ input.tagPosition = "bodyClose";
483
+ delete input.body;
485
484
  }
486
- if (tag.props.children) {
487
- tag.props.innerHTML = tag.props.children;
488
- delete tag.props.children;
485
+ if (input.children) {
486
+ input.innerHTML = input.children;
487
+ delete input.children;
489
488
  }
489
+ tag.props = await normaliseProps(tagName, { ...input });
490
490
  Object.keys(tag.props).filter((k) => TagConfigKeys.includes(k)).forEach((k) => {
491
491
  if (!["innerHTML", "textContent"].includes(k) || TagsWithInnerContent.includes(tag.tag)) {
492
492
  tag[k] = tag.props[k];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unhead/shared",
3
3
  "type": "module",
4
- "version": "1.3.0",
4
+ "version": "1.3.1",
5
5
  "author": "Harlan Wilton <harlan@harlanzw.com>",
6
6
  "license": "MIT",
7
7
  "funding": "https://github.com/sponsors/harlan-zw",
@@ -34,7 +34,7 @@
34
34
  "dist"
35
35
  ],
36
36
  "dependencies": {
37
- "@unhead/schema": "1.3.0"
37
+ "@unhead/schema": "1.3.1"
38
38
  },
39
39
  "devDependencies": {
40
40
  "packrup": "^0.1.0"