File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -60,11 +60,14 @@ export default class GraphLinkTypesPlugin extends Plugin {
6060
6161 // Find the graph view leaf in the workspace
6262 findGraphLeaf ( ) : WorkspaceLeaf | null {
63- const graphLeaves : WorkspaceLeaf [ ] = this . app . workspace . getLeavesOfType ( 'graph' ) ;
64- // Ensure there is exactly one graph leaf open
65- return graphLeaves . length === 1 ? graphLeaves [ 0 ] : null ;
63+ let graphLeaves : WorkspaceLeaf [ ] = this . app . workspace . getLeavesOfType ( 'graph' ) ;
64+ if ( graphLeaves . length == 0 ) {
65+ graphLeaves = this . app . workspace . getLeavesOfType ( 'localgraph' ) ;
66+ }
67+ // Ensure there is exactly one graph leaf open
68+ return graphLeaves . length > 0 ? graphLeaves [ 0 ] : null ;
6669 }
67-
70+
6871 // Create or update text for a given link
6972 createTextForLink ( renderer : any , link : any ) : void {
7073 // Get the text to display for the link
You can’t perform that action at this time.
0 commit comments