Change var keyword to const (#53206)

This commit is contained in:
Victor Marin 2022-08-03 14:41:39 +03:00 committed by GitHub
parent c7d3fec515
commit 34b7c38314
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,7 +37,7 @@ export const addTooltipSupport = ({
// Ensure tooltip is closed on config changes // Ensure tooltip is closed on config changes
isToolTipOpen.current = false; isToolTipOpen.current = false;
var onMouseLeave = () => { const onMouseLeave = () => {
if (!isToolTipOpen.current) { if (!isToolTipOpen.current) {
setCoords(null); setCoords(null);
} }
@ -52,7 +52,7 @@ export const addTooltipSupport = ({
ref_over.addEventListener('mouseleave', onMouseLeave); ref_over.addEventListener('mouseleave', onMouseLeave);
}); });
var clearPopupIfOpened = () => { const clearPopupIfOpened = () => {
if (isToolTipOpen.current) { if (isToolTipOpen.current) {
setCoords(null); setCoords(null);
onUPlotClick(); onUPlotClick();