Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/renderer/components/notes/graph/__tests__/loader.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('loadNotesGraphIfNeeded', () => {
expect(getNotesGraph).toHaveBeenCalledOnce()
})

it('does not reload graph data when it already exists', () => {
it('reloads graph data when entering graph with cached data', () => {
const getNotesGraph = vi.fn()

loadNotesGraphIfNeeded(
Expand All @@ -21,6 +21,6 @@ describe('loadNotesGraphIfNeeded', () => {
getNotesGraph,
)

expect(getNotesGraph).not.toHaveBeenCalled()
expect(getNotesGraph).toHaveBeenCalledOnce()
})
})
6 changes: 1 addition & 5 deletions src/renderer/components/notes/graph/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,8 @@ interface NotesGraphDataLike {
}

export function loadNotesGraphIfNeeded(
graphData: NotesGraphDataLike | null,
_graphData: NotesGraphDataLike | null,
getNotesGraph: () => unknown,
) {
if (graphData) {
return
}

getNotesGraph()
}