Skip to content

Commit

Permalink
bug fix for dataframe table
Browse files Browse the repository at this point in the history
  • Loading branch information
zuoyuanh committed Aug 17, 2018
1 parent a5452e5 commit 23c3b2f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/generators/notebookgenerator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export function createNotebookGenerator(
cell
);
let renderedHeading = renderedHeadings[0];
if (renderedHeading.type === 'markdown') {
if (renderedHeading && renderedHeading.type === 'markdown') {
if (
currentCollapseLevel < 0 &&
!Private.headingIsFilteredOut(
Expand All @@ -165,7 +165,7 @@ export function createNotebookGenerator(
) {
headings = headings.concat(renderedHeadings);
}
} else if (renderedHeading.type === 'header') {
} else if (renderedHeading && renderedHeading.type === 'header') {
if (
prevHeading &&
prevHeading.type === 'header' &&
Expand Down Expand Up @@ -247,7 +247,7 @@ export function createNotebookGenerator(
cell
);
let renderedHeading = renderedHeadings[0];
if (renderedHeading.type === 'markdown') {
if (renderedHeading && renderedHeading.type === 'markdown') {
if (
currentCollapseLevel < 0 &&
!Private.headingIsFilteredOut(
Expand All @@ -257,7 +257,7 @@ export function createNotebookGenerator(
) {
headings = headings.concat(renderedHeadings);
}
} else if (renderedHeading.type === 'header') {
} else if (renderedHeading && renderedHeading.type === 'header') {
if (
prevHeading &&
prevHeading.type === 'header' &&
Expand Down Expand Up @@ -327,7 +327,7 @@ export function createNotebookGenerator(
cell
);
let renderedHeading = renderedHeadings[0];
if (renderedHeading.type === 'markdown') {
if (renderedHeading && renderedHeading.type === 'markdown') {
if (
currentCollapseLevel < 0 &&
!Private.headingIsFilteredOut(
Expand All @@ -337,7 +337,7 @@ export function createNotebookGenerator(
) {
headings = headings.concat(renderedHeadings);
}
} else if (renderedHeading.type === 'header') {
} else if (renderedHeading && renderedHeading.type === 'header') {
if (
prevHeading &&
prevHeading.type === 'header' &&
Expand Down

0 comments on commit 23c3b2f

Please sign in to comment.