Fix console errors in some cases
This commit is contained in:
@@ -103,11 +103,14 @@ export default buildComponent({
|
|||||||
},
|
},
|
||||||
beforeUnmount() {
|
beforeUnmount() {
|
||||||
/* Performance optimization when destroying a large number of markers */
|
/* Performance optimization when destroying a large number of markers */
|
||||||
this.$children.forEach((marker) => {
|
if (this.$children && this.$children.length) {
|
||||||
if (marker.$clusterObject === this.$clusterObject) {
|
this.$children.forEach((marker) => {
|
||||||
marker.$clusterObject = null
|
if (marker.$clusterObject === this.$clusterObject) {
|
||||||
}
|
marker.$clusterObject = null
|
||||||
})
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (this.$clusterObject) {
|
if (this.$clusterObject) {
|
||||||
this.$clusterObject.clearMarkers()
|
this.$clusterObject.clearMarkers()
|
||||||
|
|||||||
Reference in New Issue
Block a user