mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-20 01:25:37 -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) {
|
||||
if (element.nodeName.toLowerCase() === 'table') {
|
||||
// add table header and table rows.
|
||||
children.push(element.children[0]);
|
||||
for (let trow of element.children[1].children) {
|
||||
children.push(trow);
|
||||
if (element.children.length > 0) {
|
||||
children.push(element.children[0]);
|
||||
if (element.children.length > 1) {
|
||||
for (let trow of element.children[1].children) {
|
||||
children.push(trow);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (element.children.length > 1) {
|
||||
children = children.concat(this.getChildren(element));
|
||||
|
||||
Reference in New Issue
Block a user