Skip to content

Commit

Permalink
#1420 Fix "action not existing" panic
Browse files Browse the repository at this point in the history
Sentry ID: 1fc4ff7fce7e4dfd9a9a01c387a88860
  • Loading branch information
helgoboss committed Jan 24, 2025
1 parent 3015e59 commit 2628b18
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main/src/application/target_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3058,7 +3058,10 @@ impl TargetModel {
pub fn action_name_label(&self) -> Cow<str> {
match self.resolved_available_action().ok() {
None => "-".into(),
Some(a) => a.name().expect("should be available").into_string().into(),
Some(a) => a
.name()
.map(|n| n.to_string().into())
.unwrap_or_else(|_| "<Failed to get action name>".into()),
}
}
}
Expand Down

0 comments on commit 2628b18

Please sign in to comment.