Skip to content

Build your personal knowledge base with Trilium Notes

fix note preview, closes #1869

zadam6e010dfbd744
diff --git a/src/public/app/services/note_content_renderer.js b/src/public/app/services/note_content_renderer.js
index 6e121c2644..1ae731dddd 100644
--- a/src/public/app/services/note_content_renderer.js
+++ b/src/public/app/services/note_content_renderer.js
@@ -39,7 +39,7 @@ async function getRenderedContent(note, options = {}) {
.css("max-width", "100%")
);
}
- else if (!options.tooltip && ['file', 'pdf', 'audio', 'video']) {
+ else if (!options.tooltip && ['file', 'pdf', 'audio', 'video'].includes(type)) {
const $downloadButton = $('<button class="file-download btn btn-primary" type="button">Download</button>');
const $openButton = $('<button class="file-open btn btn-primary" type="button">Open</button>');