Skip to content

Commit

Permalink
fix(popover): null check the ref before disposing (#1086)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gocnak authored and nnixaa committed Dec 21, 2018
1 parent aeeedf1 commit b3f7d39
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/framework/theme/components/popover/popover.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ export class NbPopoverDirective implements AfterViewInit, OnDestroy {
ngOnDestroy() {
this.alive = false;
this.hide();
this.ref.dispose();
if (this.ref) {
this.ref.dispose();
}
}

show() {
Expand Down

0 comments on commit b3f7d39

Please sign in to comment.