mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
_hidden note does not inherit attributes from root, fixes #3537
This commit is contained in:
parent
a5e21ea5f3
commit
2fa1d812f6
@ -401,7 +401,8 @@ class BNote extends AbstractBeccaEntity {
|
||||
const parentAttributes = this.ownedAttributes.slice();
|
||||
const newPath = [...path, this.noteId];
|
||||
|
||||
if (this.noteId !== 'root') {
|
||||
// inheritable attrs on root are typically not intended to be applied to hidden subtree #3537
|
||||
if (this.noteId !== 'root' && this.noteId !== '_hidden') {
|
||||
for (const parentNote of this.parents) {
|
||||
parentAttributes.push(...parentNote.__getInheritableAttributes(newPath));
|
||||
}
|
||||
@ -852,7 +853,8 @@ class BNote extends AbstractBeccaEntity {
|
||||
const set = new Set();
|
||||
|
||||
function inner(note) {
|
||||
if (set.has(note)) {
|
||||
// _hidden is not counted as subtree for the purpose of inheritance
|
||||
if (set.has(note) || note.noteId === '_hidden') {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -250,7 +250,8 @@ class FNote {
|
||||
const newPath = [...path, this.noteId];
|
||||
const attrArrs = [ this.getOwnedAttributes() ];
|
||||
|
||||
if (this.noteId !== 'root') {
|
||||
// inheritable attrs on root are typically not intended to be applied to hidden subtree #3537
|
||||
if (this.noteId !== 'root' && this.noteId !== '_hidden') {
|
||||
for (const parentNote of this.getParentNotes()) {
|
||||
// these virtual parent-child relationships are also loaded into froca
|
||||
if (parentNote.type !== 'search') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user