Skip to content
This repository has been archived by the owner on Sep 20, 2019. It is now read-only.

Commit

Permalink
Merge branch 'ts-fixTTerror' into 'master'
Browse files Browse the repository at this point in the history
Fix tt is undefined console error

See merge request hedera/myhbarwallet!375
  • Loading branch information
cacampbell committed Sep 19, 2019
2 parents fefd970 + f565332 commit 4381d5a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/Tooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,11 @@ export default createComponent({
function getPosition(): void {
const tt = (context as Context).refs.ttEl;
const curleft = tt.getBoundingClientRect().left;
if (curleft > 2 * (window.innerWidth / 3))
tt.classList.add("on-right");
if (tt) {
const curleft = tt.getBoundingClientRect().left;
if (curleft > 2 * (window.innerWidth / 3))
tt.classList.add("on-right");
}
}
window.addEventListener("click", handleCloseOnWindowClick);
Expand Down

0 comments on commit 4381d5a

Please sign in to comment.