Update app.js

This commit is contained in:
oliver
2026-06-10 19:59:07 -03:00
parent 24c4421ba7
commit 317f900d52
+6 -2
View File
@@ -1552,8 +1552,12 @@ function renderContract(data) {
// Look up expires from the agent data (new field in agents list API)
const agent = agents.find((a) => (a.UUID || a.uuid) === activeUUID);
const expires = agent ? stripQuotes(agent.expires || "") : "";
const hasExpiry = expires && expires !== "null" && expires !== "";
const rawExpires =
agent && agent.expires
? String(agent.expires).replace(/^"|"$/g, "").trim()
: "";
const hasExpiry = rawExpires && rawExpires !== "null" && rawExpires !== "";
const expires = hasExpiry ? rawExpires : "";
const label =
product && period