Skip to content

Commit d433acb

Browse files
vagishaCopilot
andauthored
Avoid calling tool.hasDocumentation() twice
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 773b64f commit d433acb

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

SkylineToolsStore/src/org/labkey/skylinetoolsstore/view/SkylineToolDetails.jsp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,10 +347,13 @@ a { text-decoration: none; }
347347
</div>
348348
</div>
349349

350-
<% if (tool.hasDocumentation() || suppIter.hasNext()) { %>
350+
<%
351+
boolean hasDocumentation = tool.hasDocumentation();
352+
%>
353+
<% if (hasDocumentation || suppIter.hasNext()) { %>
351354
<div id="documentationbox" class="itemsbox">
352355
<legend>Documentation</legend>
353-
<% if (tool.hasDocumentation()) { %>
356+
<% if (hasDocumentation) { %>
354357
<div class="barItem">
355358
<a href="<%=h(tool.getDocsUrl())%>" target="_blank" rel="noopener noreferrer">
356359
<img src="<%= h(imgDir) %>link.png" alt="Documentation" />

0 commit comments

Comments
 (0)