mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Notebooks: Fix Issue Around Load Error when Tables Have No Rows (#9980)
* Table element children length check * Add another check
This commit is contained in:
@@ -307,9 +307,13 @@ export class TextCellComponent extends CellView implements OnInit, OnChanges {
|
|||||||
for (let element of hostElem.children) {
|
for (let element of hostElem.children) {
|
||||||
if (element.nodeName.toLowerCase() === 'table') {
|
if (element.nodeName.toLowerCase() === 'table') {
|
||||||
// add table header and table rows.
|
// add table header and table rows.
|
||||||
children.push(element.children[0]);
|
if (element.children.length > 0) {
|
||||||
for (let trow of element.children[1].children) {
|
children.push(element.children[0]);
|
||||||
children.push(trow);
|
if (element.children.length > 1) {
|
||||||
|
for (let trow of element.children[1].children) {
|
||||||
|
children.push(trow);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (element.children.length > 1) {
|
} else if (element.children.length > 1) {
|
||||||
children = children.concat(this.getChildren(element));
|
children = children.concat(this.getChildren(element));
|
||||||
|
|||||||
Reference in New Issue
Block a user