@fy-/fws-vue 0.6.3 → 0.6.5

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.
Files changed (2) hide show
  1. package/composables/seo.ts +12 -8
  2. package/package.json +1 -1
@@ -105,10 +105,10 @@ export const useSeo = (seo: Ref<LazyHead>, initial: boolean = false) => {
105
105
  ];
106
106
 
107
107
  metaPairs.forEach(([seoKey, ...properties]) => {
108
- properties.forEach((property) => {
109
- console.log("property:", property);
110
- console.log("seokKey:", seoKey);
111
- if (seo.value[seoKey as keyof LazyHead]) {
108
+ const seoValue = seo.value[seoKey as keyof LazyHead];
109
+
110
+ if (seoValue !== undefined && seoValue !== null && seoValue !== "") {
111
+ properties.forEach((property) => {
112
112
  if (
113
113
  property === "description" ||
114
114
  property === "keywords" ||
@@ -116,18 +116,22 @@ export const useSeo = (seo: Ref<LazyHead>, initial: boolean = false) => {
116
116
  ) {
117
117
  metas.push({
118
118
  name: property,
119
- content: seo.value[seoKey as keyof LazyHead],
119
+ content: seoValue,
120
120
  });
121
121
  } else {
122
122
  metas.push({
123
123
  property,
124
- content: seo.value[seoKey as keyof LazyHead] as string,
124
+ content: seoValue as string,
125
125
  });
126
126
  }
127
- }
128
- });
127
+ });
128
+ }
129
129
  });
130
130
 
131
+ if (seo.value.description) {
132
+ metas.push({ name: "description", content: seo.value.description });
133
+ }
134
+
131
135
  return metas;
132
136
  }),
133
137
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fy-/fws-vue",
3
- "version": "0.6.3",
3
+ "version": "0.6.5",
4
4
  "author": "Florian 'Fy' Gasquez <m@fy.to>",
5
5
  "license": "MIT",
6
6
  "repository": {