Skip to content

Commit

Permalink
prevent adding marker twice to $clusterObject
Browse files Browse the repository at this point in the history
  • Loading branch information
HikaruTakakura committed Sep 28, 2020
1 parent e556cab commit 46bd85f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gmap-custom-marker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ export default {
},
methods: {
afterCreate(inst) {
if (this.$clusterPromise) {
if (this.$clusterPromise && !this.isMarkerAdded) {
this.$clusterPromise.then(co => {
co.addMarker(inst);
this.$clusterObject = co;
this.isMarkerAdded = true;
});
}
}
Expand Down

0 comments on commit 46bd85f

Please sign in to comment.