mirror of
https://github.com/zadam/trilium.git
synced 2025-11-11 07:45:51 +01:00
server: Fix SVG backwards compatibility (fixes #238)
This commit is contained in:
@@ -44,9 +44,8 @@ function renderSvgAttachment(image: BNote | BRevision, res: Response, attachment
|
||||
let svg: string | Buffer = '<svg/>'
|
||||
const attachment = image.getAttachmentByTitle(attachmentName);
|
||||
|
||||
const content = attachment.getContent();
|
||||
if (attachment) {
|
||||
svg = content;
|
||||
svg = attachment.getContent();
|
||||
} else {
|
||||
// backwards compatibility, before attachments, the SVG was stored in the main note content as a separate key
|
||||
const contentSvg = image.getJsonContentSafely()?.svg;
|
||||
|
||||
Reference in New Issue
Block a user