Skip to content

Commit

Permalink
fix condition for toggle tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
denisoed committed Mar 6, 2021
1 parent 559e0af commit 67bb6a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/orthography/orthographyTooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 67bb6a8

Please sign in to comment.