Fix search icon only working when section expanded (#9596) (#9601)

This commit is contained in:
Chris LaFreniere
2020-03-13 00:18:00 -07:00
committed by GitHub
parent 2f57356ae8
commit 86fbc4002a

View File

@@ -45,7 +45,7 @@ export class BookTreeItem extends vscode.TreeItem {
this.contextValue = 'savedBook';
}
} else {
if (book.type === BookTreeItemType.Markdown && book.page.expand_sections) {
if (book.page && book.page.sections && book.page.sections.length > 0) {
this.contextValue = 'section';
}
this.setPageVariables();