mirror of
https://github.com/zadam/trilium.git
synced 2025-11-11 07:45:51 +01:00
server(attachments): render empty SVGs properly (closes #1378)
This commit is contained in:
@@ -41,8 +41,8 @@ function returnImageInt(image: BNote | BRevision | null, res: Response) {
|
||||
}
|
||||
}
|
||||
|
||||
function renderSvgAttachment(image: BNote | BRevision, res: Response, attachmentName: string) {
|
||||
let svg: string | Buffer = "<svg/>";
|
||||
export function renderSvgAttachment(image: BNote | BRevision, res: Response, attachmentName: string) {
|
||||
let svg: string | Buffer = `<svg xmlns="http://www.w3.org/2000/svg"></svg>`;
|
||||
const attachment = image.getAttachmentByTitle(attachmentName);
|
||||
|
||||
if (attachment) {
|
||||
|
||||
Reference in New Issue
Block a user