Skip to content
Snippets Groups Projects
Commit 38218cb5 authored by chrisgarrity's avatar chrisgarrity
Browse files

Don’t reload default project when id doesn’t change

Fixes the issue where the default project reloads when the locale changes.

Why is SET_PROJECT_ID getting dispatched on locale change?
parent d4553f38
No related branches found
No related tags found
No related merge requests found
......@@ -172,6 +172,10 @@ const reducer = function (state, action) {
}
return state;
case SET_PROJECT_ID:
// if the projectId hasn't actually changed do nothing
if (state.projectId === action.projectId) {
return state;
}
// if setting the default project id, specifically fetch that project
if (action.projectId === defaultProjectId) {
return Object.assign({}, state, {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment