Skip to content

Commit a57dda6

Browse files
paodbjavier-godoy
authored andcommitted
fix: clear custom controls list as first step on setCustomControls
1 parent 7891f74 commit a57dda6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMap.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,7 @@ public void addCustomControls(CustomControl... customControls) {
787787
* @param customControls list of custom controls to add to the map
788788
*/
789789
public void setCustomControls(CustomControl... customControls) {
790+
this.customControls.clear();
790791
this.getElement().executeJs("this._removeCustomControls()").then((e) -> {
791792
JsonArray jsonArray = Json.createArray();
792793
for (int i = 0; i < customControls.length; i++) {

0 commit comments

Comments
 (0)