Skip to content

Commit 9a3d561

Browse files
committed
Lookup tooltip only if map has size; get from map not getTooltip
1 parent 5cb5761 commit 9a3d561

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/js/tt.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ window.tsfTT = function () {
123123
},
124124
get: ( element ) => {
125125
if ( ! _activeTooltipElements.tooltip ) {
126-
const tooltip = getTooltip( element );
127-
if ( ! tooltip ) return {};
126+
if ( ttMap.size < 1 ) return {};
128127

128+
const tooltip = ttMap.get( element );
129129
Object.assign( _activeTooltipElements, {
130130
tooltip,
131131
arrow: tooltip.querySelector( ttSelectors.arrow ),

0 commit comments

Comments
 (0)