Commit ee7aecc1 authored by JonathanMM's avatar JonathanMM

Fix issue with post without photo

parent 6009ffba
......@@ -331,7 +331,7 @@ function postOnMastodon(M, content)
var photos = content.url;
var text = content.text;
if(photos != undefined || photos.length > 0)
if(photos != undefined && photos.length > 0)
{
let photosPromise = photos.map((url, indexFile) => {
var file = fs.createWriteStream("tmp"+indexFile+".jpg");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment