fixes to the toc formatting (#9825)

* fixes to the toc formatting

* addressed comments
This commit is contained in:
Maddy
2020-04-06 15:30:08 -07:00
committed by GitHub
parent 2247682863
commit 4c01482a8f
2 changed files with 111 additions and 39 deletions

View File

@@ -101,7 +101,7 @@ export class BookTreeViewProvider implements vscode.TreeDataProvider<BookTreeIte
try {
let books: BookModel[] = this.books.filter(book => book.bookPath === bookPath) || [];
// Check if the book is already open in viewlet.
if (books.length > 0 && books[0].bookItems) {
if (books.length > 0 && books[0].bookItems.length > 0) {
this.currentBook = books[0];
await this.showPreviewFile(urlToOpen);
}