Commit 7fb4faf
committed
fix(spp_gis): null draw control before destroying map on re-render
When renderMap() destroys the old map, the MapboxDraw control's
internal map reference becomes null. Later, addDrawInteraction()
tried to removeControl(this.draw) from the new map, but the draw
control called this.map.off() on its now-null internal reference.
Fix: set this.draw = null before map.remove() so addDrawInteraction
skips the removeControl call for stale controls.1 parent 3b1faba commit 7fb4faf
1 file changed
Lines changed: 1 addition & 0 deletions
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
| |||
0 commit comments