Commit f27aa53
deepshekhardas
fix: null-safe getTime() calls in replication services (triggerdotdev#3519)
Add optional chaining to getTime() calls on createdAt, updatedAt
fields in runs and sessions replication services. When CDC sends rows
before timestamps are fully populated, calling .getTime() on undefined
crashes the replication service with a TypeError.
- runsReplicationService.server.ts: null-safe updatedAt/createdAt in
#prepareTaskRunInsert and #preparePayloadInsert
- sessionsReplicationService.server.ts: null-safe createdAt/updatedAt in
toSessionInsertArray1 parent c80b85e commit f27aa53
2 files changed
Lines changed: 5 additions & 5 deletions
File tree
- apps/webapp/app/services
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
875 | 875 | | |
876 | 876 | | |
877 | 877 | | |
878 | | - | |
879 | | - | |
| 878 | + | |
| 879 | + | |
880 | 880 | | |
881 | 881 | | |
882 | 882 | | |
| |||
936 | 936 | | |
937 | 937 | | |
938 | 938 | | |
939 | | - | |
| 939 | + | |
940 | 940 | | |
941 | 941 | | |
942 | 942 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
750 | 750 | | |
751 | 751 | | |
752 | 752 | | |
753 | | - | |
754 | | - | |
| 753 | + | |
| 754 | + | |
755 | 755 | | |
756 | 756 | | |
757 | 757 | | |
| |||
0 commit comments