mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-26 08:38:58 -04:00
Fix environment editing when switching requests
This commit is contained in:
1 parent
2301000a4b
commit
b9c7df33e7
1 file changed
+5
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user