Fix compilation errors in ChartsViewModel and AllocationEvolutionChart
- Remove unnecessary optional binding for non-optional source.id - Break up AllocationEvolutionChart body to help Swift type-checker Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -294,8 +294,7 @@ class ChartsViewModel: ObservableObject {
|
||||
let sources: [InvestmentSource]
|
||||
if !selectedSourceIds.isEmpty {
|
||||
sources = sourceRepository.sources.filter { source in
|
||||
guard let id = source.id else { return false }
|
||||
return selectedSourceIds.contains(id) && shouldIncludeSource(source)
|
||||
selectedSourceIds.contains(source.id) && shouldIncludeSource(source)
|
||||
}
|
||||
} else if let selectedSource {
|
||||
sources = sourceRepository.sources.filter { $0.id == selectedSource.id && shouldIncludeSource($0) }
|
||||
|
||||
Reference in New Issue
Block a user