Skip to content

Build your personal knowledge base with Trilium Notes

fixes

azivner8bf4633cd079
diff --git a/src/routes/api/import.js b/src/routes/api/import.js
index f372765023..8fea221f45 100644
--- a/src/routes/api/import.js
+++ b/src/routes/api/import.js
@@ -33,6 +33,10 @@ async function importToBranch(req) {
}
function toHtml(text) {
+ if (!text) {
+ return '';
+ }
+
return '<p>' + text.replace(/(?:\r\n|\r|\n)/g, '</p><p>') + '</p>';
}
diff --git a/src/routes/api/tree.js b/src/routes/api/tree.js
index daeece1dad..2696bd65ea 100644
--- a/src/routes/api/tree.js
+++ b/src/routes/api/tree.js
@@ -56,7 +56,7 @@ async function load(req) {
const branchIds = req.body.branchIds;
if (branchIds && branchIds.length > 0) {
- noteIds = (await sql.getColumn(`SELECT noteId FROM branches WHERE isDeleted = 0 AND branchId IN(???)`, branchIds))
+ noteIds = (await sql.getManyRows(`SELECT noteId FROM branches WHERE isDeleted = 0 AND branchId IN(???)`, branchIds))
.map(note => note.noteId);
}