We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23ef650 commit ea1f6aaCopy full SHA for ea1f6aa
src/pages/contributors.rs
@@ -99,7 +99,12 @@ 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"]
104
+ .is_null())
105
+ .then(|| repo["collaborators"]["nodes"].as_array().unwrap())
106
+ })
107
+ .flatten()
108
.filter_map(|c| leptos::serde_json::from_value::<Contributor>(c.clone()).ok())
109
.fold(HashMap::new(), |prev, c| {
110
let mut prev = prev;
0 commit comments