Skip to content

Commit d927d0e

Browse files
committed
Refactor EventBasedRemovalTracker
1 parent 54bed6a commit d927d0e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/decorators/trackRemoval.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,12 @@ class EventBasedRemovalTracker {
1818
attach (element) {
1919
const {tooltip} = this
2020

21-
let listener = function (e) {
21+
const listener = (e) => {
2222
if (e.currentTarget === tooltip.state.currentTarget) {
2323
tooltip.hideTooltip()
2424
this.listeners.splice(this.listeners.indexOf(listener), 1)
2525
}
2626
}
27-
listener = listener.bind(this)
2827

2928
this.listeners.push({
3029
element,

0 commit comments

Comments
 (0)