We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 23ef650 commit 3da72f9Copy full SHA for 3da72f9
src/pages/contributors.rs
@@ -99,7 +99,11 @@ pub async fn fetch_contributors() -> Vec<Contributor> {
99
.as_array()
100
.unwrap_or(&Vec::new())
101
.iter()
102
- .flat_map(|repo| repo["collaborators"]["nodes"].as_array().unwrap())
+ .filter_map(|repo| {
103
+ (!repo["collaborators"].is_null())
104
+ .then(|| repo["collaborators"]["nodes"].as_array().unwrap())
105
+ })
106
+ .flatten()
107
.filter_map(|c| leptos::serde_json::from_value::<Contributor>(c.clone()).ok())
108
.fold(HashMap::new(), |prev, c| {
109
let mut prev = prev;
0 commit comments