Skip to content

Commit

Permalink
fix: override checkbox text only if not empty
Browse files Browse the repository at this point in the history
- Override text on checkboxes for embedded group
  applications only if resulting value is not empty.
- Behavior depends on the presence of group param in
  URL query and its value.
  • Loading branch information
zlamalp committed Oct 25, 2023
1 parent 585f94f commit 673a9ac
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ protected Widget initWidget() {
if (widget instanceof CheckBox) {
CheckBox checkBox = (CheckBox) widget;
String[] parsedGroupName = checkBox.getText().split(Window.Location.getParameter("group") + ":");
// use group name without parent group prefix
checkBox.setText(parsedGroupName[1]);
// use group name without parent group prefix only if there is one
if (parsedGroupName[1] != null) {
checkBox.setText(parsedGroupName[1]);
}
}
}
}
Expand Down

0 comments on commit 673a9ac

Please sign in to comment.