This commit is contained in:
Joao Moreno 2017-04-26 17:14:22 +02:00
parent fad430efb9
commit bf02ba2f7d

View file

@ -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) {