Skip to content

Commit

Permalink
fix: building release
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioRibera committed Jul 18, 2024
1 parent 23ef650 commit 612a1b2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/pages/contributors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ pub async fn fetch_contributors() -> Vec<Contributor> {
.as_array()
.unwrap_or(&Vec::new())
.iter()
.flat_map(|repo| repo["collaborators"]["nodes"].as_array().unwrap())
.filter_map(|repo| {
repo["collaborators"]
.is_null()
.then(|| repo["collaborators"]["nodes"].as_array().unwrap())
})
.flatten()
.filter_map(|c| leptos::serde_json::from_value::<Contributor>(c.clone()).ok())
.fold(HashMap::new(), |prev, c| {
let mut prev = prev;
Expand Down

0 comments on commit 612a1b2

Please sign in to comment.