Skip to content

Commit 43569f5

Browse files
paodbjavier-godoy
authored andcommitted
fix(demo): show message if label text is missing when adding marker
Close #161
1 parent 9ab7000 commit 43569f5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/test/java/com/flowingcode/vaadin/addons/googlemaps/AddMarkersDemo.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ protected void createGoogleMapsDemo(String apiKey) {
120120
}
121121

122122
if(withLabel.getValue()) {
123+
if(labelText.getValue().isEmpty()) {
124+
Notification.show("Please select a label for the marker");
125+
return;
126+
}
123127
MarkerLabel label = new MarkerLabel(labelText.getValue());
124128
label.setColor("white");
125129
label.setFontWeight("bold");

0 commit comments

Comments
 (0)