Fix issues due to missing notebook values (specs and cells) (#4008)

- Fix #3844
    - Fix #3955
    - Specs can be null on early load of Jupyter kernels
    - Cells were missing in some reference test .ipynb files. We should be resilient to malformed files if possible.
This commit is contained in:
Kevin Cunnane
2019-02-11 17:17:56 -08:00
committed by GitHub
parent 62404721ed
commit 67f9a7f5e4
2 changed files with 11 additions and 5 deletions

View File

@@ -71,8 +71,10 @@ namespace v4 {
nbformat_minor: contents.nbformat_minor
};
for (let cell of contents.cells) {
notebook.cells.push(readCell(cell));
if (contents.cells) {
for (let cell of contents.cells) {
notebook.cells.push(readCell(cell));
}
}
return notebook;