Skip to content

Commit b93ee55

Browse files
Fixes validation for "unstaged only" case
1 parent c52101f commit b93ee55

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/webviews/plus/composer/composerWebview.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,10 @@ export class ComposerWebviewProvider implements WebviewProvider<State, State, Co
301301
const staged = this._context.diff.unstagedIncluded ? diffs?.unified : diffs?.staged;
302302
const unstaged = this._context.diff.unstagedIncluded ? undefined : diffs?.unstaged;
303303

304+
if (!diffs?.staged?.contents && diffs?.unstaged?.contents) {
305+
this._context.diff.unstagedIncluded = true;
306+
}
307+
304308
// Allow composer to open with no changes - we'll handle this in the UI
305309
const hasChanges = Boolean(staged?.contents || unstaged?.contents);
306310

0 commit comments

Comments
 (0)