Handle empty items in ids

This commit is contained in:
Edward Firmo
2024-02-29 19:15:22 +01:00
parent ca6c2db015
commit fb7b477f5d
2 changed files with 12 additions and 3 deletions

View File

@@ -247,8 +247,8 @@ api:
visible: bool # Set to true to show the component, or false to hide it.
then:
- lambda: |-
if (!id(is_uploading_tft)) {
for (const std::string& component_id : ids) {
for (const std::string& component_id : ids) {
if (!id(is_uploading_tft) and !component_id.empty()) {
set_component_visibility->execute(component_id.c_str(), visible);
}
}