File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
widgets/attribute_widgets Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -839,8 +839,7 @@ export default class FNote {
839839 return [ ] ;
840840 }
841841
842- const promotedAttrs = this . getAttributes ( )
843- . filter ( ( attr ) => attr . isDefinition ( ) )
842+ const promotedAttrs = this . getAttributeDefinitions ( )
844843 . filter ( ( attr ) => {
845844 const def = attr . getDefinition ( ) ;
846845
@@ -860,6 +859,11 @@ export default class FNote {
860859 return promotedAttrs ;
861860 }
862861
862+ getAttributeDefinitions ( ) {
863+ return this . getAttributes ( )
864+ . filter ( ( attr ) => attr . isDefinition ( ) ) ;
865+ }
866+
863867 hasAncestor ( ancestorNoteId : string , followTemplates = false , visitedNoteIds : Set < string > | null = null ) {
864868 if ( this . noteId === ancestorNoteId ) {
865869 return true ;
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ function formatRelation(attr: AttributeWithDefinitions): ComponentChildren {
9191}
9292
9393function getAttributesWithDefinitions ( note : FNote , attributesToIgnore : string [ ] = [ ] ) : AttributeWithDefinitions [ ] {
94- const promotedDefinitionAttributes = note . getPromotedDefinitionAttributes ( ) ;
94+ const promotedDefinitionAttributes = note . getAttributeDefinitions ( ) ;
9595 const result : AttributeWithDefinitions [ ] = [ ] ;
9696 for ( const attr of promotedDefinitionAttributes ) {
9797 const def = attr . getDefinition ( ) ;
You can’t perform that action at this time.
0 commit comments