feat: Allow adding custom product total amount#1233
feat: Allow adding custom product total amount#1233mmustafa-tse wants to merge 1 commit intomParticle:developmentfrom
Conversation
PR SummaryMedium Risk Overview Backwards compatibility and coverage. If Written by Cursor Bugbot for commit 098b107. This will update automatically on new commits. Configure here. |
|
| totalAmount, | ||
| name | ||
| ); | ||
| } |
There was a problem hiding this comment.
Null totalAmount destroys attributes due to typeof quirk
Medium Severity
The backward-compatibility check typeof totalAmount == 'object' at line 301 also matches null, since typeof null === 'object' in JavaScript. If a caller explicitly passes null for totalAmount (a common pattern when skipping optional positional parameters), sanitizeAttributes(null, name) returns null, overwriting any valid attributes that were already sanitized at line 263. This silently destroys the user's custom attributes.





Background
What Has Changed
Screenshots/Video
Checklist
Additional Notes
Reference Issue (For employees only. Ignore if you are an outside contributor)