nuxt-og-image 1.5.4 → 1.5.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.
package/dist/module.json CHANGED
@@ -5,5 +5,5 @@
5
5
  "bridge": false
6
6
  },
7
7
  "configKey": "ogImage",
8
- "version": "1.5.4"
8
+ "version": "1.5.5"
9
9
  }
@@ -82,9 +82,9 @@ const descriptionAttrs = computed(() => {
82
82
  <div v-bind="containerAttrs">
83
83
  <div class="flex flex-col w-full">
84
84
  <div v-bind="titleAttrs">
85
- {{ title }}
85
+ {{ title || 'Null Title' }}
86
86
  </div>
87
- <div v-bind="descriptionAttrs">
87
+ <div v-if="description" v-bind="descriptionAttrs">
88
88
  {{ description }}
89
89
  </div>
90
90
  </div>
@@ -30,6 +30,10 @@ export async function loadFont(font) {
30
30
  export async function walkSatoriTree(url, node, plugins) {
31
31
  if (!node.props?.children)
32
32
  return;
33
+ if (Array.isArray(node.props.children) && node.props.children.length === 0) {
34
+ delete node.props.children;
35
+ return;
36
+ }
33
37
  for (const child of node.props.children || []) {
34
38
  if (child) {
35
39
  for (const plugin of plugins) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-og-image",
3
3
  "type": "module",
4
- "version": "1.5.4",
4
+ "version": "1.5.5",
5
5
  "packageManager": "pnpm@7.8.0",
6
6
  "license": "MIT",
7
7
  "funding": "https://github.com/sponsors/harlan-zw",