Skip to content

Commit 7b7ab67

Browse files
committed
Simplify condition by separating
1 parent f5aefa5 commit 7b7ab67

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/modules/tooltip/Tooltip.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -567,10 +567,10 @@ export default class Tooltip {
567567
) {
568568
this.handleStickyTooltip(e, clientX, clientY, opt)
569569
} else {
570-
if (
571-
w.config.chart.type === 'heatmap' ||
572-
w.config.chart.type === 'treemap'
573-
) {
570+
const isHeatmap = w.config.chart.type === 'heatmap'
571+
const isTreemap = w.config.chart.type === 'treemap'
572+
573+
if (isHeatmap || isTreemap) {
574574
let markerXY = this.intersect.handleHeatTreeTooltip({
575575
e,
576576
opt,

0 commit comments

Comments
 (0)