dont display sources without an url

This commit is contained in:
derpystuff 2023-03-02 23:32:38 +01:00
parent 2c6387e7d9
commit fa1129e83a

View file

@ -32,7 +32,7 @@ function createWolframPage(context, pod, query, sources){
if(pod.value && pod.refs) {
for(const r of pod.refs){
let src = getWolframSource(r, sources)
res.embeds[0].description += citation(r, src.url, src.title)
if(src.url) res.embeds[0].description += citation(r, src.url, src.title)
}
}
if(pod.image) res.embeds[0].image = { url: pod.image };