Skip to content

Commit

Permalink
hide when zero
Browse files Browse the repository at this point in the history
  • Loading branch information
janoside committed Oct 7, 2024
1 parent 01585b7 commit dd725e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions views/node-details.pug
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ block content
+pageTab("Details", true)

if (getblockchaininfo.warnings)
if (Array.isArray(getblockchaininfo.warnings) && getblockchaininfo.warnings.length > -1)
if (Array.isArray(getblockchaininfo.warnings) && getblockchaininfo.warnings.length > 0)
+contentSection("Active Warnings")
pre
code.json(data-lang="json") #{JSON.stringify(getblockchaininfo.warnings, null, 4)}

else if (typeof getblockchaininfo.warnings === "string" && getblockchaininfo.warnings.trim().length > 0)
+contentSection("Active Warnings")
span.text-danger #{getblockchaininfo.warnings}
Expand Down

0 comments on commit dd725e2

Please sign in to comment.