diff --git a/src/commands/git/fetch.ts b/src/commands/git/fetch.ts index ca7d897..8979e1b 100644 --- a/src/commands/git/fetch.ts +++ b/src/commands/git/fetch.ts @@ -148,7 +148,7 @@ export class FetchGitCommand extends QuickCommandBase { state.flags = selection[0].item; } else { - state.flags = []; + state.flags = state.flags || []; } this.execute(state as State); diff --git a/src/commands/git/pull.ts b/src/commands/git/pull.ts index 25ac5cb..cc8a6d5 100644 --- a/src/commands/git/pull.ts +++ b/src/commands/git/pull.ts @@ -125,7 +125,7 @@ export class PullGitCommand extends QuickCommandBase { state.flags = selection[0].item; } else { - state.flags = []; + state.flags = state.flags || []; } this.execute(state as State); diff --git a/src/commands/git/push.ts b/src/commands/git/push.ts index b9af39f..46211d5 100644 --- a/src/commands/git/push.ts +++ b/src/commands/git/push.ts @@ -125,7 +125,7 @@ export class PushGitCommand extends QuickCommandBase { state.flags = selection[0].item; } else { - state.flags = []; + state.flags = state.flags || []; } this.execute(state as State); diff --git a/src/commands/git/stash.ts b/src/commands/git/stash.ts index 8f8771d..4a11280 100644 --- a/src/commands/git/stash.ts +++ b/src/commands/git/stash.ts @@ -358,7 +358,7 @@ export class StashGitCommand extends QuickCommandBase { state.subcommand = selection[0].command; state.flags = selection[0].item; } else { - state.flags = []; + state.flags = state.flags || []; } void Container.git.stashApply(state.repo.path, state.stash!.stashName, state.subcommand === 'pop'); @@ -521,7 +521,7 @@ export class StashGitCommand extends QuickCommandBase { state.flags = selection[0].item; } else { - state.flags = []; + state.flags = state.flags || []; } void Container.git.stashSave(state.repo.path, state.message, state.uris, {