fix: do not generate preview if title not present

This commit is contained in:
Adhiraj Singh
2022-11-17 11:27:08 +05:30
parent b33c753928
commit 26828d3dea

View File

@@ -48,7 +48,7 @@ export const getUrlInfo = async(
}
const info = await getLinkPreview(previewLink, opts.fetchOpts)
if(info && 'title' in info) {
if(info && 'title' in info && info.title) {
const [image] = info.images
const urlInfo: WAUrlInfo = {