File tree Expand file tree Collapse file tree
src/vs/code/browser/workbench Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -440,7 +440,13 @@ class WindowIndicator implements IWindowIndicator {
440440 // Find credentials from DOM
441441 const credentialsElement = document . getElementById ( 'vscode-workbench-credentials' ) ;
442442 const credentialsElementAttribute = credentialsElement ? credentialsElement . getAttribute ( 'data-settings' ) : undefined ;
443- const credentialsProvider = new LocalStorageCredentialsProvider ( credentialsElementAttribute ? JSON . parse ( credentialsElementAttribute ) : [ ] ) ;
443+ let credentials = undefined ;
444+ if ( credentialsElementAttribute ) {
445+ try {
446+ credentials = JSON . parse ( credentialsElementAttribute ) ;
447+ } catch ( error ) { /* Invalid credentials are passed. Ignore. */ }
448+ }
449+ const credentialsProvider = new LocalStorageCredentialsProvider ( credentials || [ ] ) ;
444450
445451 // Finally create workbench
446452 create ( document . body , {
You can’t perform that action at this time.
0 commit comments