Skip to content

Commit 9ab4f59

Browse files
committed
Make fetching diff from GH conditional
1 parent 1766ca8 commit 9ab4f59

File tree

1 file changed

+5
-2
lines changed
  • packages/app/src/app/overmind/namespaces/git

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,11 @@ export const createRepoClicked: AsyncAction = async ({ state, effects }) => {
5959
effects.router.updateSandboxUrl({ git });
6060
};
6161

62-
export const gitMounted: AsyncAction = ({ actions }) =>
63-
actions.git.internal.fetchGitChanges();
62+
export const gitMounted: AsyncAction = async ({ actions, state }) => {
63+
if (state.editor.currentSandbox.originalGit) {
64+
await actions.git.internal.fetchGitChanges();
65+
}
66+
};
6467

6568
export const createCommitClicked: AsyncAction = async ({ state, effects }) => {
6669
const { git } = state;

0 commit comments

Comments
 (0)