fix(plugins/followup): possible negative width values [skip ci]

This commit is contained in:
lowlighter
2022-12-11 22:27:28 -05:00
parent 3df41e5a3e
commit 34cbcfd831

View File

@@ -33,7 +33,7 @@
{p:(skipped-collaborators.skipped)/count, fill:"#8B949E"}, {p:(skipped-collaborators.skipped)/count, fill:"#8B949E"},
{p:collaborators.skipped/count, fill:"#c9d1d9"}, {p:collaborators.skipped/count, fill:"#c9d1d9"},
]) { %> ]) { %>
<rect mask="url(#issues-bar)" x="<%= x %>" y="0" width="<%= p*width || 0 %>" height="8" fill="<%= fill %>"/> <rect mask="url(#issues-bar)" x="<%= x %>" y="0" width="<%= Math.max(p*width || 0, 0) %>" height="8" fill="<%= fill %>"/>
<% x += p*width }} %> <% x += p*width }} %>
</svg> </svg>
<% if ((plugins.followup.indepth)&&(section.issues.collaborators)) { %> <% if ((plugins.followup.indepth)&&(section.issues.collaborators)) { %>