fix: add property existence checks before accessing repository config fields
This commit is contained in:
parent
e78af76beb
commit
1a12436195
1 changed files with 2 additions and 2 deletions
|
|
@ -116,7 +116,7 @@ export const RepositoryInfoTabContent = ({ repository }: Props) => {
|
||||||
{repository.lastChecked ? new Date(repository.lastChecked).toLocaleString() : "Never"}
|
{repository.lastChecked ? new Date(repository.lastChecked).toLocaleString() : "Never"}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{repository.type === "rest" && (
|
{repository.type === "rest" && "cacert" in repository.config && (
|
||||||
<>
|
<>
|
||||||
<div>
|
<div>
|
||||||
<div className="text-sm font-medium text-muted-foreground">CA Certificate</div>
|
<div className="text-sm font-medium text-muted-foreground">CA Certificate</div>
|
||||||
|
|
@ -131,7 +131,7 @@ export const RepositoryInfoTabContent = ({ repository }: Props) => {
|
||||||
<div>
|
<div>
|
||||||
<div className="text-sm font-medium text-muted-foreground">TLS Certificate Validation</div>
|
<div className="text-sm font-medium text-muted-foreground">TLS Certificate Validation</div>
|
||||||
<p className="mt-1 text-sm">
|
<p className="mt-1 text-sm">
|
||||||
{repository.config.insecureTls ? (
|
{"insecureTls" in repository.config && repository.config.insecureTls ? (
|
||||||
<span className="text-red-500">disabled</span>
|
<span className="text-red-500">disabled</span>
|
||||||
) : (
|
) : (
|
||||||
<span className="text-green-500">enabled</span>
|
<span className="text-green-500">enabled</span>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue