Skip to content

Commit 3ab77e0

Browse files
committed
fix: building release
1 parent 23ef650 commit 3ab77e0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/pages/contributors.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,13 @@ pub async fn fetch_contributors() -> Vec<Contributor> {
9999
.as_array()
100100
.unwrap_or(&Vec::new())
101101
.iter()
102-
.flat_map(|repo| repo["collaborators"]["nodes"].as_array().unwrap())
102+
.flat_map(|repo| {
103+
if !repo["collaborators"].is_null() {
104+
repo["collaborators"]["nodes"].as_array().unwrap()
105+
} else {
106+
&Vec::new()
107+
}
108+
})
103109
.filter_map(|c| leptos::serde_json::from_value::<Contributor>(c.clone()).ok())
104110
.fold(HashMap::new(), |prev, c| {
105111
let mut prev = prev;

0 commit comments

Comments
 (0)