mirror of
https://github.com/Kong/insomnia
synced 2024-11-07 22:30:15 +00:00
Fix environment editing when switching requests
This commit is contained in:
parent
2301000a4b
commit
b9c7df33e7
@ -42,7 +42,12 @@ class WorkspaceEnvironmentsEditModal extends Component {
|
||||
|
||||
if (environmentToActivate) {
|
||||
activeEnvironmentId = environmentToActivate._id
|
||||
} else if (this.state.workspace && workspace._id !== this.state.workspace._id) {
|
||||
// We've changed workspaces, so load the root one
|
||||
activeEnvironmentId = rootEnvironment._id;
|
||||
} else {
|
||||
// We haven't changed workspaces, so try loading the last environment, and fall back
|
||||
// to the root one
|
||||
activeEnvironmentId = this.state.activeEnvironmentId || rootEnvironment._id;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user