Skip to content

Commit 1c3a8a8

Browse files
dipsylalaMarcus Watson
andauthored
fix: pluralize issues number (#125)
Displays '2 issues' rather than '2 issue' if multiple issues have been found by an advisory source. Pluralize tested against: https://www.npmjs.com/package/react-scripts https://pypi.org/project/openpyxl-templates/ Checking for regression issues against the following, which should show singular issues in one of the artifacts. https://www.npmjs.com/package/react-day-picker https://www.npmjs.com/package/node-sass https://pypi.org/project/pydub/ Lint output: ``` xxxxxxxxxxxxxx:~/Projects/overlay$ npm run lint > lint > eslint src tests e2e ``` yarn test output: ``` Test Suites: 12 passed, 12 total Tests: 1 skipped, 193 passed, 194 total Snapshots: 0 total Time: 5.022 s Ran all test suites. Done in 5.98s. ``` Co-authored-by: Marcus Watson <mwatson@veracode.com>
1 parent 21b4b76 commit 1c3a8a8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/custom-elements/PackageReport.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@
3737
</div>
3838

3939
<div class="overlay-indicator__tooltip__source__issues" v-if="source.issues">
40-
<div class="overlay-indicator__tooltip__source__issues__wrapper">{{ source.issues }} issue</div>
40+
<div class="overlay-indicator__tooltip__source__issues__wrapper">
41+
{{ source.issues }} issue{{ source.issues !== 1 ? 's' : '' }}
42+
</div>
4143
</div>
4244

4345
<div class="overlay-indicator__tooltip__source__actions">

0 commit comments

Comments
 (0)