From 67bb6a8d1cea19ce68528ef10c0853fc67a00aa8 Mon Sep 17 00:00:00 2001 From: Denisoed Date: Sat, 6 Mar 2021 22:26:55 +0600 Subject: [PATCH] fix condition for toggle tooltip --- src/orthography/orthographyTooltip.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/orthography/orthographyTooltip.ts b/src/orthography/orthographyTooltip.ts index 9b9b95f..1938867 100644 --- a/src/orthography/orthographyTooltip.ts +++ b/src/orthography/orthographyTooltip.ts @@ -69,7 +69,7 @@ export class OrthographyTooltip implements IOrthographyTooltip { private toggleTooltip(event: any): void { if (event.type === 'mouseover') { - if (event.target.className.includes(HIGHLIGHT_CSS_CLASS)) { + if (event.target && event.target.className.includes(HIGHLIGHT_CSS_CLASS)) { self.setDataToTooltip(event.target); self.tooltip.classList.add(TOOLTIP_VISIBLE_CSS_CLASS); self.tooltip.style.left = self.getLeftPos(event);