Fix image in meta and other details
This commit is contained in:
@ -18,7 +18,7 @@ const {
|
||||
const image =
|
||||
typeof _image === "string"
|
||||
? new URL(_image, Astro.site)
|
||||
: typeof _image["src"] !== "undefined"
|
||||
: _image && typeof _image["src"] !== "undefined"
|
||||
? new URL(getRelativeUrlByFilePath(_image.src), Astro.site)
|
||||
: null;
|
||||
---
|
||||
|
@ -16,7 +16,7 @@ const {
|
||||
|
||||
let picture = null;
|
||||
try {
|
||||
picture = await getPicture({
|
||||
picture = src && await getPicture({
|
||||
src,
|
||||
widths,
|
||||
formats,
|
||||
@ -24,7 +24,6 @@ try {
|
||||
})
|
||||
}
|
||||
catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
|
||||
const { image = {}, sources = [] } = picture || {}
|
||||
|
Reference in New Issue
Block a user