Skip to content

Commit

Permalink
#14: Fix crash when no resources in group (res or blog)
Browse files Browse the repository at this point in the history
  • Loading branch information
PetoMPP committed Dec 8, 2023
1 parent baad1d6 commit a7b2c89
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/atoms/resource_select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ fn resource_list(props: &ResourceListProps) -> Html {
}
};
let vec_into_elements = |vec: Vec<(&ResId, bool)>| {
if vec.is_empty() {
return vec![vec![]];
}

vec.clone()
.chunks(3)
.map(|x| {
Expand Down

0 comments on commit a7b2c89

Please sign in to comment.