Skip to content

Commit

Permalink
fix weird crash with missing timeline
Browse files Browse the repository at this point in the history
My timeline wen't missing and then I started crashing here..

bizarre
  • Loading branch information
jb55 committed Dec 18, 2024
1 parent 785d102 commit f693bb5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions crates/notedeck_columns/src/route.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,11 @@ impl Route {
match self {
Route::Timeline(tlr) => match tlr {
TimelineRoute::Timeline(id) => {
let timeline = columns
.find_timeline(*id)
.expect("expected to find timeline");
timeline.kind.to_title()
if let Some(timeline) = columns.find_timeline(*id) {
timeline.kind.to_title()
} else {
ColumnTitle::simple("Unknown")
}
}
TimelineRoute::Thread(_id) => ColumnTitle::simple("Thread"),
TimelineRoute::Reply(_id) => ColumnTitle::simple("Reply"),
Expand Down

0 comments on commit f693bb5

Please sign in to comment.