Commit 3187571
committed
fix: handle non-iterable messageInfo.attachments in mailbox sync
Add defensive || [] fallback when iterating over messageInfo.attachments
to prevent TypeError when attachments is undefined or null. This fixes
crashes during processNew, publishSyncedEvents, and other sync operations
when processing messages without attachments.
Affected locations:
- ARF complaint attachment download (line 780)
- Inline attachment fetching (line 1088)
- CID-referenced attachment collection (lines 1380, 2317)1 parent 533f026 commit 3187571
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
777 | 777 | | |
778 | 778 | | |
779 | 779 | | |
780 | | - | |
| 780 | + | |
781 | 781 | | |
782 | 782 | | |
783 | 783 | | |
| |||
1085 | 1085 | | |
1086 | 1086 | | |
1087 | 1087 | | |
1088 | | - | |
| 1088 | + | |
1089 | 1089 | | |
1090 | 1090 | | |
1091 | 1091 | | |
| |||
1377 | 1377 | | |
1378 | 1378 | | |
1379 | 1379 | | |
1380 | | - | |
| 1380 | + | |
1381 | 1381 | | |
1382 | 1382 | | |
1383 | 1383 | | |
| |||
2314 | 2314 | | |
2315 | 2315 | | |
2316 | 2316 | | |
2317 | | - | |
| 2317 | + | |
2318 | 2318 | | |
2319 | 2319 | | |
2320 | 2320 | | |
| |||
0 commit comments