display_name undefined error in javascript (#4187)

This commit is contained in:
Raj
2019-02-26 13:10:40 -08:00
committed by GitHub
parent 8bfb1a9d39
commit fe5386cc08

View File

@@ -154,7 +154,9 @@ export class CodeComponent extends AngularDisposable implements OnInit, OnChange
}
private isSqlCodeCell() {
return this._model.defaultKernel.display_name === notebookConstants.SQL
return this._model
&& this._model.defaultKernel
&& this._model.defaultKernel.display_name === notebookConstants.SQL
&& this.cellModel.cellType === CellTypes.Code
&& this.cellModel.cellUri;
}