mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 05:19:39 +00:00
🐛 fixes #25225
This commit is contained in:
parent
fad430efb9
commit
bf02ba2f7d
|
@ -314,7 +314,7 @@ export class CommandCenter {
|
|||
|
||||
@command('git.stage')
|
||||
async stage(...resourceStates: SourceControlResourceState[]): Promise<void> {
|
||||
if (resourceStates.length === 0) {
|
||||
if (resourceStates.length === 0 || !(resourceStates[0].resourceUri instanceof Uri)) {
|
||||
const resource = this.getSCMResource();
|
||||
|
||||
if (!resource) {
|
||||
|
@ -417,7 +417,7 @@ export class CommandCenter {
|
|||
|
||||
@command('git.unstage')
|
||||
async unstage(...resourceStates: SourceControlResourceState[]): Promise<void> {
|
||||
if (resourceStates.length === 0) {
|
||||
if (resourceStates.length === 0 || !(resourceStates[0].resourceUri instanceof Uri)) {
|
||||
const resource = this.getSCMResource();
|
||||
|
||||
if (!resource) {
|
||||
|
@ -482,7 +482,7 @@ export class CommandCenter {
|
|||
|
||||
@command('git.clean')
|
||||
async clean(...resourceStates: SourceControlResourceState[]): Promise<void> {
|
||||
if (resourceStates.length === 0) {
|
||||
if (resourceStates.length === 0 || !(resourceStates[0].resourceUri instanceof Uri)) {
|
||||
const resource = this.getSCMResource();
|
||||
|
||||
if (!resource) {
|
||||
|
|
Loading…
Reference in a new issue