Skip to content

Commit

Permalink
Fix crash on feed screen (#52)
Browse files Browse the repository at this point in the history
## Summary

This change fixes the crash on feed screen, when the following
precondition fails in runtime:
https://github.com/pointfreeco/swift-composable-architecture/blob/fc5cbeec88114ff987f6c3cad3a7f3a3713fdb56/Sources/ComposableArchitecture/Observation/IdentifiedArray%2BObservation.swift#L105-L115

Fixes #51 

## What was done

- [x] Update use of store collection in SwiftUI.
- [x] Update GitHub issue template (not related to the crash).
- [x] Update graph images (not related to the crash).
  • Loading branch information
darrarski authored Oct 19, 2024
2 parents bf117e4 + 91657bd commit b7352e9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,25 @@ assignees: ''

<!-- A clear and concise description of what the bug is. -->

## Environment

- <!-- App version, platform. -->
- <!-- OS version. -->
- <!-- Other info. -->

## Steps to reproduce

1. <!-- e.g. Go to ... -->
2. <!-- e.g. Click on ... -->
3. <!-- e.g. Scroll down to ... -->

## Expected behavior
### Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

4. <!-- e.g. Expected to see ... -->

## Actual behavior
### Actual behavior

<!-- What actually happened - describe the unexpected behavior. -->

Expand Down
2 changes: 1 addition & 1 deletion Projects/App/FeedFeature/Sources/FeedView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public struct FeedView: View {
if showPlaceholder {
placeholderView
} else {
ForEach(store.scope(state: \.statuses, action: \.status)) { statusStore in
ForEach(Array(store.scope(state: \.statuses, action: \.status))) { statusStore in
StatusView(store: statusStore)
}
.transition(
Expand Down
Binary file modified web/assets/graph-external.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b7352e9

Please sign in to comment.