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

This commit is contained in:
lowlighter
2022-12-11 22:40:49 -05:00
parent 34cbcfd831
commit 77462c5d74
2 changed files with 3 additions and 3 deletions

View File

@@ -36,7 +36,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)) { %>
@@ -105,7 +105,7 @@
{p:(merged-collaborators.merged)/count, fill:"#8957e5"}, {p:(merged-collaborators.merged)/count, fill:"#8957e5"},
{p:collaborators.merged/count, fill:"#d2a8ff"}, {p:collaborators.merged/count, fill:"#d2a8ff"},
]) { %> ]) { %>
<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.pr.collaborators)) { %> <% if ((plugins.followup.indepth)&&(section.pr.collaborators)) { %>

View File

@@ -102,7 +102,7 @@
{p:(merged-collaborators.merged)/count, fill:"#8957e5"}, {p:(merged-collaborators.merged)/count, fill:"#8957e5"},
{p:collaborators.merged/count, fill:"#d2a8ff"}, {p:collaborators.merged/count, fill:"#d2a8ff"},
]) { %> ]) { %>
<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.pr.collaborators)) { %> <% if ((plugins.followup.indepth)&&(section.pr.collaborators)) { %>