unhead 1.1.4 → 1.1.6

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
@@ -557,7 +557,7 @@ async function normaliseTag(tagName, input) {
557
557
  delete tag.props[k];
558
558
  });
559
559
  ["innerHTML", "textContent"].forEach((k) => {
560
- if (tag.tag === "script" && tag[k] && ["application/ld+json", "application/json"].includes(tag.props.type)) {
560
+ if (tag.tag === "script" && typeof tag[k] === "string" && ["application/ld+json", "application/json"].includes(tag.props.type)) {
561
561
  try {
562
562
  tag[k] = JSON.parse(tag[k]);
563
563
  } catch (e) {
package/dist/index.mjs CHANGED
@@ -556,7 +556,7 @@ async function normaliseTag(tagName, input) {
556
556
  delete tag.props[k];
557
557
  });
558
558
  ["innerHTML", "textContent"].forEach((k) => {
559
- if (tag.tag === "script" && tag[k] && ["application/ld+json", "application/json"].includes(tag.props.type)) {
559
+ if (tag.tag === "script" && typeof tag[k] === "string" && ["application/ld+json", "application/json"].includes(tag.props.type)) {
560
560
  try {
561
561
  tag[k] = JSON.parse(tag[k]);
562
562
  } catch (e) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "unhead",
3
3
  "type": "module",
4
- "version": "1.1.4",
4
+ "version": "1.1.6",
5
5
  "packageManager": "pnpm@7.27.1",
6
6
  "author": "Harlan Wilton <harlan@harlanzw.com>",
7
7
  "license": "MIT",
@@ -32,9 +32,9 @@
32
32
  "dependencies": {
33
33
  "hookable": "^5.4.2",
34
34
  "packrup": "^0.1.0",
35
- "@unhead/dom": "1.1.4",
36
- "@unhead/schema": "1.1.4",
37
- "@unhead/shared": "1.1.4"
35
+ "@unhead/dom": "1.1.6",
36
+ "@unhead/schema": "1.1.6",
37
+ "@unhead/shared": "1.1.6"
38
38
  },
39
39
  "scripts": {
40
40
  "build": "unbuild .",