From 98674f6f813407d7871dce1a884d21618ed3d3bb Mon Sep 17 00:00:00 2001 From: Eduard Tihomirov Date: Fri, 24 Jan 2025 14:33:45 +0300 Subject: [PATCH] SUPPORT-8783: Fix --- .../modules/app/component/home-landing.component.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/frontend/src/ts/modules/app/component/home-landing.component.ts b/frontend/src/ts/modules/app/component/home-landing.component.ts index 751d267..943d8f5 100644 --- a/frontend/src/ts/modules/app/component/home-landing.component.ts +++ b/frontend/src/ts/modules/app/component/home-landing.component.ts @@ -14,8 +14,16 @@ export class HomeLandingComponent implements OnInit { ngOnInit(): void { let url = this.appConfigService.getParamValue("cert_check_url") fetch(url) - .then(() => document.getElementById("browser-check-info").hidden = true) - .catch(() => document.getElementById("browser-check-info").hidden = false) + .then((response) => { + if (!response.ok) { + document.getElementById("cert-check-info").hidden = false; + console.error("Server responded with status " + response.status); + } + document.getElementById("cert-check-info").hidden = true; + }) + .catch(() => { + document.getElementById("cert-check-info").hidden = false; + }) .finally(() => this.cd.markForCheck()); } }