-
Notifications
You must be signed in to change notification settings - Fork 49.9k
Closed
Description
There is a typo in dangerfile.js which results in an unreachable code path which ought to be hit when there is no matching base artifact during DangerCI automated code review.
See:
Line 73 in 221f300
| if (Number === Infinity) { |
Compare:
Line 171 in 221f300
| change: Infinity, |
And the case which should hit this code path:
Line 160 in 221f300
| // There's no matching base artifact. This is a new file. |
Given the above context, the condition Number === Infinity is clearly meant to be decimal === Infinity, which it will be if the catch statement triggers when there is no matching base artifact. Without this fix, the primitive value Infinity is passed to percentFormatter.format(decimal), resulting in the string '+∞%'. With this fix, the resulting string will be the intended 'New file'.
PR 32277 resolves this
Metadata
Metadata
Assignees
Labels
No labels