Skip to content

Commit 07de0b6

Browse files
committed
Thought of another edge case
1 parent 9090dfc commit 07de0b6

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

packages/updatePrescriptionStatus/src/utils/sqsClient.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ export async function pushPrescriptionToNotificationSQS(
236236
.filter(({current, previous}) => {
237237
if (!previous) return true // no previous item (or hit an error getting one) -> treat as changed
238238
if (previous.PostDatedLastModifiedSetAt) return true // previous was post-dated -> treat as changed
239+
if (current.PostDatedLastModifiedSetAt) return true // current is post-dated -> treat as changed
239240
return norm(current.Status) !== norm(previous.Status)
240241
})
241242
.map(({current}) => current)

0 commit comments

Comments
 (0)