Skip to content

Commit 3656aab

Browse files
unselect file when opening types etc.
1 parent e371253 commit 3656aab

File tree

1 file changed

+6
-5
lines changed
  • packages/app/src/app/overmind/namespaces/editor

1 file changed

+6
-5
lines changed

packages/app/src/app/overmind/namespaces/editor/actions.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,8 @@ export const moduleSelected: Action<{
363363
}
364364
}
365365
} catch (error) {
366-
// Do nothing, it is most likely VSCode selecting a file
367-
// that is deleted... yeah... it does that
366+
// You jumped to a file not in the Sandbox, for example typings
367+
state.editor.currentModuleShortid = null;
368368
}
369369
};
370370

@@ -518,9 +518,10 @@ export const fetchEnvironmentVariables: AsyncAction = async ({
518518
);
519519
};
520520

521-
export const updateEnvironmentVariables: AsyncAction<
522-
EnvironmentVariable
523-
> = async ({ state, effects }, environmentVariable) => {
521+
export const updateEnvironmentVariables: AsyncAction<EnvironmentVariable> = async (
522+
{ state, effects },
523+
environmentVariable
524+
) => {
524525
state.editor.currentSandbox.environmentVariables = await effects.api.saveEnvironmentVariable(
525526
state.editor.currentSandbox.id,
526527
environmentVariable

0 commit comments

Comments
 (0)