From 612a1b2260ff89ed32354df1c297402483af25b6 Mon Sep 17 00:00:00 2001 From: Sergio Ribera <56278796+SergioRibera@users.noreply.github.com> Date: Thu, 18 Jul 2024 13:02:24 -0400 Subject: [PATCH] fix: building release --- src/pages/contributors.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pages/contributors.rs b/src/pages/contributors.rs index 3c198e5..550b678 100644 --- a/src/pages/contributors.rs +++ b/src/pages/contributors.rs @@ -99,7 +99,12 @@ pub async fn fetch_contributors() -> Vec { .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::(c.clone()).ok()) .fold(HashMap::new(), |prev, c| { let mut prev = prev;