Fix linking an image/svg+xml image to an unsaved entry would give an error

An error happened! (EGroupware\Api\Exception\AssertionFailed): File 'true' is not an absolute path!
was generated because we tried to use webdav.phptrue as the thumbnail
This commit is contained in:
nathangray 2021-04-28 12:00:02 -06:00
parent 6b283c50ad
commit ab389f314e

View File

@ -156,7 +156,7 @@ egw.extend('images', egw.MODULE_GLOBAL, function()
image = this.link('/api/thumbnail.php', params);
}
// for svg return image itself
else if (type[0] == 'image' && type[1] == 'svg+xml')
else if (type[0] == 'image' && type[1] == 'svg+xml' && typeof _path == "string")
{
image = this.webserverUrl+'/webdav.php'+_path;
}