Commit c6ed239
Guard deconstructRegistration against null Registration (#520691) (#451)
Intercom.client().fetchLoggedInUserAttributes() returns null when no user
is logged in (e.g. after the OS kills and restarts the process, clearing
the native session). Both the oldarch and newarch IntercomModule pass that
return value straight into IntercomHelpers.deconstructRegistration(), which
immediately calls registration.getEmail() and throws a fatal
NullPointerException on the JS bridge thread.
Return an empty map when registration is null, matching the iOS bridge,
which resolves an empty dictionary for the same "no logged-in user" case.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 48ade7d commit c6ed239
1 file changed
Lines changed: 8 additions & 1 deletion
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | | - | |
| 249 | + | |
250 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
251 | 258 | | |
252 | 259 | | |
253 | 260 | | |
| |||
0 commit comments