fix broken SCM view

This commit is contained in:
Joao Moreno 2021-12-09 21:57:47 +01:00
parent d9fa2b1213
commit ac035214a7
No known key found for this signature in database
GPG key ID: 896B853774D1A575
2 changed files with 3 additions and 1 deletions

View file

@ -206,6 +206,7 @@ export class ExtHostSCMInputBox implements vscode.SourceControlInputBox {
}
set value(value: string) {
value = value ?? '';
this._proxy.$setInputBoxValue(this._sourceControlHandle, value);
this.updateValue(value);
}

View file

@ -147,6 +147,7 @@ class SCMInput implements ISCMInput {
if (key) {
try {
history = JSON.parse(this.storageService.get(key, StorageScope.GLOBAL, '')).history;
history = history?.filter(s => !!s);
} catch {
// noop
}
@ -171,7 +172,7 @@ class SCMInput implements ISCMInput {
return;
}
const history = [...this.historyNavigator];
const history = [...this.historyNavigator].filter(s => !!s);
if (history.length === 0 || (history.length === 1 && history[0] === '')) {
return;