Skip to content

Commit c33e872

Browse files
committed
Fix problem with specify server URI if on insiders (#9233)
1 parent d2ceec7 commit c33e872

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/client/datascience/datascience.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ export class DataScience implements IDataScience {
312312
// newChoice element will be set if the user picked 'enter a new server'
313313
const item = await input.showQuickPick<ISelectUriQuickPickItem, IQuickPickParameters<ISelectUriQuickPickItem>>({
314314
placeholder: localize.DataScience.jupyterSelectURIQuickPickPlaceholder(),
315-
items: await this.getUriPickList(),
315+
items: this.getUriPickList(),
316316
title: localize.DataScience.jupyterSelectURIQuickPickTitle()
317317
});
318318
if (item.label === this.localLabel) {
@@ -357,7 +357,7 @@ export class DataScience implements IDataScience {
357357
}
358358
}
359359

360-
private async getUriPickList(): Promise<ISelectUriQuickPickItem[]> {
360+
private getUriPickList(): ISelectUriQuickPickItem[] {
361361
// Always have 'local' and 'add new'
362362
const items: ISelectUriQuickPickItem[] = [];
363363
items.push({ label: this.localLabel, detail: localize.DataScience.jupyterSelectURILocalDetail(), newChoice: false });
@@ -366,8 +366,10 @@ export class DataScience implements IDataScience {
366366
// Get our list of recent server connections and display that as well
367367
const savedURIList = getSavedUriList(this.globalState);
368368
savedURIList.forEach(uriItem => {
369-
const uriDate = new Date(uriItem.time);
370-
items.push({ label: uriItem.uri, detail: localize.DataScience.jupyterSelectURIMRUDetail().format(uriDate.toLocaleString()), newChoice: false });
369+
if (uriItem.uri) {
370+
const uriDate = new Date(uriItem.time);
371+
items.push({ label: uriItem.uri, detail: localize.DataScience.jupyterSelectURIMRUDetail().format(uriDate.toLocaleString()), newChoice: false });
372+
}
371373
});
372374

373375
return items;

0 commit comments

Comments
 (0)