Skip to content

Commit eb6c667

Browse files
committed
Reload project context if the requested project id differs from the one already loaded.
Closes #107
1 parent 7def24a commit eb6c667

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/lib/components/projects/controller.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,15 @@ export async function loadProjectContext(projectId) {
77
const context = get(contextProject)
88

99
// If the context is already loaded, do not reload it
10-
if (context.project !== undefined) return
10+
if (context.project !== undefined) {
11+
const currentProjectId = context.project.id
12+
13+
// If the project loaded is the same as the one we want to load, do not reload it
14+
if (currentProjectId === projectId) {
15+
return
16+
}
17+
18+
}
1119

1220
await getProject(projectId)
1321
.then((project) => {

0 commit comments

Comments
 (0)