mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 20:06:08 +01:00
fix occurrences of 'root' branch
This commit is contained in:
@@ -143,7 +143,7 @@ function setExpanded(req) {
|
||||
const {branchId} = req.params;
|
||||
const expanded = parseInt(req.params.expanded);
|
||||
|
||||
if (branchId !== 'root') {
|
||||
if (branchId !== 'none_root') {
|
||||
sql.execute("UPDATE branches SET isExpanded = ? WHERE branchId = ?", [expanded, branchId]);
|
||||
// we don't sync expanded label
|
||||
// also this does not trigger updates to the frontend, this would trigger too many reloads
|
||||
@@ -172,7 +172,7 @@ function setExpandedForSubtree(req) {
|
||||
SELECT branchId FROM tree`, [branchId]);
|
||||
|
||||
// root is always expanded
|
||||
branchIds = branchIds.filter(branchId => branchId !== 'root');
|
||||
branchIds = branchIds.filter(branchId => branchId !== 'none_root');
|
||||
|
||||
sql.executeMany(`UPDATE branches SET isExpanded = ${expanded} WHERE branchId IN (???)`, branchIds);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user