Repository navigation
Commit 421ea38
fix(mobile): stop crashing on launch before the shell snapshot arrives
Build 56 still died on every cold open. The device's expo-error.log names
it: "TypeError: Cannot read property 'defaultModelSelection' of null" in
NewTaskFlowProvider. resolveProjectSettings reads the project aggregate's
legacy fields when projectSettingsFolded is false, and the mobile flow
passes its selected project through as-is, which is null until the shell
snapshot lands. tsc did not catch it: apps/mobile extends Expo's tsconfig
without noUncheckedIndexedAccess, so `projects[0] ?? null` types as
non-null there.
Accept null in resolveProjectSettings and treat it like an absent project.
Co-Authored-By: Claude Code <[email protected]>1 parent d7c71f9 commit 421ea38
2 files changed
Lines changed: 12 additions & 2 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
32 | 40 | | |
33 | 41 | | |
34 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
66 | | - | |
| 68 | + | |
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
| |||
0 commit comments