Skip to content

Commit

Permalink
fix: tooltip not destroyed
Browse files Browse the repository at this point in the history
  • Loading branch information
themustafaomar committed Nov 21, 2021
1 parent 69c3167 commit ae46126
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/js/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,10 @@ class Map {
// Destroy the map
destroy(destroyInstance = true) {
const eventRegistry = EventHandler.getEventRegistry()
const tooltip = this.tooltip.selector
const keys = Object.keys

// Remove tooltip from the DOM
removeElement(tooltip)
removeElement(this.tooltip.getElement())

// Remove event registry
keys(eventRegistry).forEach(event => {
Expand Down

0 comments on commit ae46126

Please sign in to comment.