Skip to content

Commit

Permalink
fix: admin/internet: unwanted error displayed in HTTPS box when no ce…
Browse files Browse the repository at this point in the history
…rtificate is provided
  • Loading branch information
rejetto committed Dec 10, 2023
1 parent 3ee57c3 commit 8b3c71a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion admin/src/InternetPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export default function InternetPage() {
isCertError(error) && h(Alert, { severity: 'warning' }, error),
prefix("Error: ", error)
|| disabled && h(LinkBtn, { onClick: notEnabled }, "Not enabled"),
cert.element || with_(cert.data, c => h(Box, {},
cert.element || with_(cert.data, c => c.none ? "No certificate configured" : h(Box, {},
h(CardMembership, { fontSize: 'small', sx: { mr: 1, verticalAlign: 'middle' } }), "Current certificate",
h('ul', {},
h('li', {}, "Domain: ", c.altNames?.join(' + ') ||'-'),
Expand Down
2 changes: 1 addition & 1 deletion src/api.net.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const apis: ApiHandlers = {
},

get_cert() {
return getCertObject() || new ApiError(HTTP_NOT_FOUND)
return getCertObject() || { none: true }
}
}

Expand Down

0 comments on commit 8b3c71a

Please sign in to comment.