Fixed bugs in workflow step preview (#16445)

Release Notes:

- N/A
This commit is contained in:
Mikayla Maki 2024-08-18 22:18:04 -07:00 committed by GitHub
parent 43e13df9f3
commit 86efde4b76
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 109 additions and 42 deletions

View file

@ -920,7 +920,22 @@ impl Pane {
cx: &AppContext,
) -> Option<Box<dyn ItemHandle>> {
self.items.iter().find_map(|item| {
if item.is_singleton(cx) && item.project_entry_ids(cx).as_slice() == [entry_id] {
if item.is_singleton(cx) && (item.project_entry_ids(cx).as_slice() == [entry_id]) {
Some(item.boxed_clone())
} else {
None
}
})
}
pub fn item_for_path(
&self,
project_path: ProjectPath,
cx: &AppContext,
) -> Option<Box<dyn ItemHandle>> {
self.items.iter().find_map(move |item| {
if item.is_singleton(cx) && (item.project_path(cx).as_slice() == [project_path.clone()])
{
Some(item.boxed_clone())
} else {
None