Fix unavail modifiable empty store (#686)

This commit is contained in:
Max Goedjen 2025-09-10 00:24:06 -07:00 committed by GitHub
parent cd12e4c828
commit 7c7db56c1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -43,7 +43,11 @@ struct StoreListView: View {
// Do this to avoid a blip.
SecretDetailView(secret: nextDefaultSecret)
} else {
EmptyStoreView(store: storeList.modifiableStore ?? storeList.stores.first)
if let modifiable = storeList.modifiableStore, modifiable.isAvailable {
EmptyStoreView(store: modifiable)
} else {
EmptyStoreView(store: storeList.stores.first(where: \.isAvailable))
}
}
}
.navigationSplitViewStyle(.balanced)