From 3ae32ab0a03c8d76bcc9c288653a05f905ebdad7 Mon Sep 17 00:00:00 2001 From: Chris LaFreniere <40371649+chlafreniere@users.noreply.github.com> Date: Tue, 19 Feb 2019 08:28:55 -1000 Subject: [PATCH] Fix the Attempt to use a destroyed view Errors (#4087) --- src/sql/parts/notebook/cellViews/outputArea.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sql/parts/notebook/cellViews/outputArea.component.ts b/src/sql/parts/notebook/cellViews/outputArea.component.ts index c20ec93102..9eac59741b 100644 --- a/src/sql/parts/notebook/cellViews/outputArea.component.ts +++ b/src/sql/parts/notebook/cellViews/outputArea.component.ts @@ -34,7 +34,9 @@ export class OutputAreaComponent extends AngularDisposable implements OnInit { this.updateTheme(this.themeService.getColorTheme()); if (this.cellModel) { this._register(this.cellModel.onOutputsChanged(() => { - this._changeRef.detectChanges(); + if (!(this._changeRef['destroyed'])) { + this._changeRef.detectChanges(); + } })); } }