@unhead/vue 1.0.12 → 1.0.14

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
@@ -919,7 +919,7 @@ function resolveMetaKeyType(key) {
919
919
  }
920
920
 
921
921
  function unpackMeta(input) {
922
- return unpackToArray(input, {
922
+ const meta = unpackToArray(input, {
923
923
  key({ key }) {
924
924
  return resolveMetaKeyType(key);
925
925
  },
@@ -930,6 +930,8 @@ function unpackMeta(input) {
930
930
  return MetaPackingSchema[key]?.keyValue || fixKeyCase(key);
931
931
  },
932
932
  resolveValueData({ value, key }) {
933
+ if (value === null)
934
+ return "_null";
933
935
  if (typeof value === "object") {
934
936
  const definition = MetaPackingSchema[key];
935
937
  if (key === "refresh")
@@ -940,6 +942,8 @@ function unpackMeta(input) {
940
942
  entrySeparator: ", ",
941
943
  keyValueSeparator: "=",
942
944
  resolve({ value: value2, key: key2 }) {
945
+ if (value2 === null)
946
+ return "";
943
947
  if (typeof value2 === "boolean")
944
948
  return `${key2}`;
945
949
  },
@@ -950,6 +954,7 @@ function unpackMeta(input) {
950
954
  return typeof value === "number" ? value.toString() : value;
951
955
  }
952
956
  });
957
+ return meta.filter((v) => typeof v.content === "undefined" || v.content !== "_null");
953
958
  }
954
959
 
955
960
  const PropertyPrefixKeys = /^(og|twitter|fb)/;
package/dist/index.mjs CHANGED
@@ -917,7 +917,7 @@ function resolveMetaKeyType(key) {
917
917
  }
918
918
 
919
919
  function unpackMeta(input) {
920
- return unpackToArray(input, {
920
+ const meta = unpackToArray(input, {
921
921
  key({ key }) {
922
922
  return resolveMetaKeyType(key);
923
923
  },
@@ -928,6 +928,8 @@ function unpackMeta(input) {
928
928
  return MetaPackingSchema[key]?.keyValue || fixKeyCase(key);
929
929
  },
930
930
  resolveValueData({ value, key }) {
931
+ if (value === null)
932
+ return "_null";
931
933
  if (typeof value === "object") {
932
934
  const definition = MetaPackingSchema[key];
933
935
  if (key === "refresh")
@@ -938,6 +940,8 @@ function unpackMeta(input) {
938
940
  entrySeparator: ", ",
939
941
  keyValueSeparator: "=",
940
942
  resolve({ value: value2, key: key2 }) {
943
+ if (value2 === null)
944
+ return "";
941
945
  if (typeof value2 === "boolean")
942
946
  return `${key2}`;
943
947
  },
@@ -948,6 +952,7 @@ function unpackMeta(input) {
948
952
  return typeof value === "number" ? value.toString() : value;
949
953
  }
950
954
  });
955
+ return meta.filter((v) => typeof v.content === "undefined" || v.content !== "_null");
951
956
  }
952
957
 
953
958
  const PropertyPrefixKeys = /^(og|twitter|fb)/;
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@unhead/vue",
3
3
  "type": "module",
4
- "version": "1.0.12",
5
- "packageManager": "pnpm@7.18.1",
4
+ "version": "1.0.14",
5
+ "packageManager": "pnpm@7.19.0",
6
6
  "author": "Harlan Wilton <harlan@harlanzw.com>",
7
7
  "license": "MIT",
8
8
  "funding": "https://github.com/sponsors/harlan-zw",
@@ -34,11 +34,11 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "hookable": "^5.4.2",
37
- "@unhead/schema": "1.0.12"
37
+ "@unhead/schema": "1.0.14"
38
38
  },
39
39
  "devDependencies": {
40
40
  "vue": "^3.2.45",
41
- "unhead": "1.0.12"
41
+ "unhead": "1.0.14"
42
42
  },
43
43
  "scripts": {
44
44
  "build": "unbuild .",