Check if sessionManager exists (#5811)

This commit is contained in:
Chris LaFreniere
2019-05-31 17:42:12 -07:00
committed by GitHub
parent 23e4a30cd1
commit 34bc0efc1c

View File

@@ -306,7 +306,7 @@ export class ClientSession implements IClientSession {
*/
public async shutdown(): Promise<void> {
// Always try to shut down session
if (this._session && this._session.id) {
if (this._session && this._session.id && this.notebookManager && this.notebookManager.sessionManager) {
await this.notebookManager.sessionManager.shutdown(this._session.id);
}
}