Absence of "age" property is not correctly handeled #9

Closed
opened 2025-01-14 15:28:05 +01:00 by leon · 1 comment
leon commented 2025-01-14 15:28:05 +01:00 (Migrated from git.leon.wtf)

Here, we check for nonexistence: git.leon.wtf/leon/reporting-endpoint-worker/-@d118dc614c/src/handlers.js (L29)

But this expression returns false, even if the age propety is set to 0, which sometimes is a legitimate case. The check must be more specific to null and undefined.

Here, we check for nonexistence: https://git.leon.wtf/leon/reporting-endpoint-worker/-/blob/d118dc614cc063444dd0d9ea4f14d301e1322d43/src/handlers.js#L29 But this expression returns false, even if the age propety is set to 0, which sometimes is a legitimate case. The check must be more specific to null and undefined.
leon commented 2025-01-14 15:28:05 +01:00 (Migrated from git.leon.wtf)

assigned to @leon

assigned to @leon
leon (Migrated from git.leon.wtf) closed this issue 2025-01-14 20:18:31 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
leon/reporting-endpoint-worker#9
No description provided.