Add null ref check for click handler (#9190)

This commit is contained in:
Charles Gagnon
2020-02-18 10:18:02 -08:00
committed by GitHub
parent 506c6a5e5f
commit 48c3702c7a

View File

@@ -164,7 +164,7 @@ export default class DivContainer extends ContainerBase<azdata.DivItemLayout> im
}
if (this.clickable && !this.cancelClick) {
this.cancelClick = this.renderer.listen(this.divContainer.nativeElement, 'click', () => this.onClick());
} else if (!this.clickable) {
} else if (!this.clickable && this.cancelClick) {
this.cancelClick();
this.cancelClick = undefined;
}