fix: don't assume previous workspace still exists #1588
This commit is contained in:
parent
3f74a22cca
commit
c9e64acad2
1 changed files with 3 additions and 2 deletions
|
|
@ -1144,8 +1144,9 @@ impl Workspaces {
|
||||||
.or(self.backup_set.as_ref())
|
.or(self.backup_set.as_ref())
|
||||||
.map(|set| {
|
.map(|set| {
|
||||||
(
|
(
|
||||||
set.previously_active
|
set.previously_active.and_then(|(idx, start)| {
|
||||||
.map(|(idx, start)| (&set.workspaces[idx], start)),
|
set.workspaces.get(idx).map(|previous| (previous, start))
|
||||||
|
}),
|
||||||
&set.workspaces[set.active],
|
&set.workspaces[set.active],
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue