Merge branch 'master' into ben/sandbox-environment

This commit is contained in:
Benjamin Pasero
2020-09-04 10:45:13 +02:00
26 changed files with 178 additions and 64 deletions

View File

@@ -440,7 +440,13 @@ class WindowIndicator implements IWindowIndicator {
// Find credentials from DOM
const credentialsElement = document.getElementById('vscode-workbench-credentials');
const credentialsElementAttribute = credentialsElement ? credentialsElement.getAttribute('data-settings') : undefined;
const credentialsProvider = new LocalStorageCredentialsProvider(credentialsElementAttribute ? JSON.parse(credentialsElementAttribute) : []);
let credentials = undefined;
if (credentialsElementAttribute) {
try {
credentials = JSON.parse(credentialsElementAttribute);
} catch (error) { /* Invalid credentials are passed. Ignore. */ }
}
const credentialsProvider = new LocalStorageCredentialsProvider(credentials || []);
// Finally create workbench
create(document.body, {