Repository navigation
Commit a0d72c7
committed
Fix: app crashed on open with no error — unguarded Intl call at render time
Intl.DateTimeFormat().resolvedOptions().timeZone ran as a bare destructuring
default with no try/catch, unlike every other side-effecting call in this
file (theme fetch, AsyncStorage, polling). Some release-mode Hermes builds
ship without full Intl support, so accessing it there throws — and since
this runs at render time before any error boundary exists, it's an uncaught
fatal with no red-box/dev-menu output, which matches "crashes on open, no
error, sudden exit" exactly (only reproduces in release builds, not debug,
since debug has Metro's overlay to at least surface something).
Wrapped it in a helper that falls back to "UTC" on any failure — same
fallback behavior AsyncStorage/theme-fetch already use elsewhere in this
file.1 parent 0a58937 commit a0d72c7
2 files changed
Lines changed: 32 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
6 | 21 | | |
7 | 22 | | |
8 | 23 | | |
9 | 24 | | |
10 | 25 | | |
11 | 26 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 27 | + | |
17 | 28 | | |
18 | 29 | | |
19 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
45 | 60 | | |
46 | 61 | | |
47 | 62 | | |
48 | 63 | | |
49 | 64 | | |
50 | 65 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | 66 | | |
56 | 67 | | |
57 | | - | |
| 68 | + | |
58 | 69 | | |
59 | 70 | | |
60 | 71 | | |
| |||
0 commit comments