mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
@@ -183,7 +183,7 @@ export class TreeView extends Disposable implements ITreeView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getChildren(node: ITreeItem): Promise<ITreeItem[]> {
|
async getChildren(node: ITreeItem): Promise<ITreeItem[]> {
|
||||||
let children: ITreeItem[];
|
let children: ITreeItem[] | undefined = undefined;
|
||||||
if (node && node.children) {
|
if (node && node.children) {
|
||||||
children = node.children;
|
children = node.children;
|
||||||
} else {
|
} else {
|
||||||
@@ -192,7 +192,7 @@ export class TreeView extends Disposable implements ITreeView {
|
|||||||
}
|
}
|
||||||
if (node instanceof Root) {
|
if (node instanceof Root) {
|
||||||
const oldEmpty = this._isEmpty;
|
const oldEmpty = this._isEmpty;
|
||||||
this._isEmpty = children.length === 0;
|
this._isEmpty = !children || children.length === 0;
|
||||||
if (oldEmpty !== this._isEmpty) {
|
if (oldEmpty !== this._isEmpty) {
|
||||||
this._onDidChangeEmpty.fire();
|
this._onDidChangeEmpty.fire();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user