Skip to content

Commit 5f9548d

Browse files
committed
fix: conditionally return image if set
1 parent 730fdbc commit 5f9548d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ class Meta {
7979
});
8080
});
8181

82-
return { title: key[0], description: key[1], image: key[2] || null };
82+
const obj = { title: key[0], description: key[1] };
83+
if (key[2]) obj.image = key[2];
84+
return obj;
8385
}
8486

8587
middleware(ctx, next) {

0 commit comments

Comments
 (0)