shell: Don't crash on zero outputs for global-mode
This commit is contained in:
parent
3b9d0ce3d7
commit
b1778dabb3
1 changed files with 4 additions and 7 deletions
|
|
@ -819,13 +819,10 @@ impl Workspaces {
|
|||
) {
|
||||
match self.mode {
|
||||
WorkspaceMode::Global => {
|
||||
// this should never happen
|
||||
let max = self
|
||||
.sets
|
||||
.values()
|
||||
.map(|set| set.workspaces.len())
|
||||
.max()
|
||||
.unwrap_or_default();
|
||||
let Some(max) = self.sets.values().map(|set| set.workspaces.len()).max() else {
|
||||
return;
|
||||
};
|
||||
|
||||
for set in self
|
||||
.sets
|
||||
.values_mut()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue