Skip to content

Commit f5aefa5

Browse files
committed
Replace filter in favor of includes
1 parent 57c182e commit f5aefa5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/modules/tooltip/Tooltip.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -555,10 +555,9 @@ export default class Tooltip {
555555
xcrosshairs.classList.add('apexcharts-active')
556556
}
557557

558-
const hasYAxisTooltip = this.yaxisTooltips.filter((b) => {
559-
return b === true
560-
})
561-
if (this.ycrosshairs !== null && hasYAxisTooltip.length) {
558+
const hasYAxisTooltip = this.yaxisTooltips.includes(true)
559+
560+
if (this.ycrosshairs !== null && hasYAxisTooltip) {
562561
this.ycrosshairs.classList.add('apexcharts-active')
563562
}
564563

0 commit comments

Comments
 (0)