From 14554f0d111b5d6c03cd97d35a53b507f123318f Mon Sep 17 00:00:00 2001 From: Charles Gagnon Date: Wed, 20 May 2020 11:54:25 -0700 Subject: [PATCH] Fix some issues with book tree view (#10521) --- extensions/notebook/src/book/bookTreeView.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/notebook/src/book/bookTreeView.ts b/extensions/notebook/src/book/bookTreeView.ts index f8d989f387..948d516150 100644 --- a/extensions/notebook/src/book/bookTreeView.ts +++ b/extensions/notebook/src/book/bookTreeView.ts @@ -86,7 +86,7 @@ export class BookTreeViewProvider implements vscode.TreeDataProvider { - let notebook = this.currentBook.getNotebook(document.uri.fsPath); + let notebook = this.currentBook?.getNotebook(document.uri.fsPath); if (notebook && this._bookTrustManager.isNotebookTrustedByDefault(document.uri.fsPath)) { document.setTrusted(true); } @@ -235,10 +235,10 @@ export class BookTreeViewProvider implements vscode.TreeDataProvider { - if (this.currentBook.bookPath) { + if (this.currentBook?.bookPath) { const allFilesFilter = loc.allFiles; let filter: any = {}; filter[allFilesFilter] = '*';