mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
fix (#11437)
This commit is contained in:
@@ -243,7 +243,7 @@ export class BookTreeViewProvider implements vscode.TreeDataProvider<BookTreeIte
|
|||||||
notebookPath = uri.fsPath;
|
notebookPath = uri.fsPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shouldReveal || this._bookViewer.visible) {
|
if (shouldReveal || this._bookViewer?.visible) {
|
||||||
bookItem = notebookPath ? await this.findAndExpandParentNode(notebookPath) : undefined;
|
bookItem = notebookPath ? await this.findAndExpandParentNode(notebookPath) : undefined;
|
||||||
// Select + focus item in viewlet if books viewlet is already open, or if we pass in variable
|
// Select + focus item in viewlet if books viewlet is already open, or if we pass in variable
|
||||||
if (bookItem) {
|
if (bookItem) {
|
||||||
@@ -264,7 +264,7 @@ export class BookTreeViewProvider implements vscode.TreeDataProvider<BookTreeIte
|
|||||||
let book = allNodes ? Array.from(allNodes?.keys())?.filter(x => x.indexOf(notebookPath.substring(0, notebookPath.lastIndexOf(path.sep))) > -1) : undefined;
|
let book = allNodes ? Array.from(allNodes?.keys())?.filter(x => x.indexOf(notebookPath.substring(0, notebookPath.lastIndexOf(path.sep))) > -1) : undefined;
|
||||||
let bookNode = book?.length > 0 ? this.currentBook?.getNotebook(book.find(x => x.substring(0, x.lastIndexOf(path.sep)) === notebookPath.substring(0, notebookPath.lastIndexOf(path.sep)))) : undefined;
|
let bookNode = book?.length > 0 ? this.currentBook?.getNotebook(book.find(x => x.substring(0, x.lastIndexOf(path.sep)) === notebookPath.substring(0, notebookPath.lastIndexOf(path.sep)))) : undefined;
|
||||||
if (bookNode) {
|
if (bookNode) {
|
||||||
if (this._bookViewer.visible) {
|
if (this._bookViewer?.visible) {
|
||||||
await this._bookViewer.reveal(bookNode, { select: true, focus: false, expand: 3 });
|
await this._bookViewer.reveal(bookNode, { select: true, focus: false, expand: 3 });
|
||||||
} else {
|
} else {
|
||||||
await this.getChildren(bookNode);
|
await this.getChildren(bookNode);
|
||||||
|
|||||||
Reference in New Issue
Block a user