From 92a6e85fe7679b47bb61f7ff6bc757c7ee75a440 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 27 Feb 2023 15:18:47 +0100 Subject: Breaking: remove ios 11, safari 11 support Angular doesn't support these web browsers anymore Safari 11 and iOS 11 are not supported anymore by Apple --- client/src/main.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'client/src') diff --git a/client/src/main.ts b/client/src/main.ts index 432db0eac..159c47e86 100644 --- a/client/src/main.ts +++ b/client/src/main.ts @@ -25,7 +25,19 @@ const bootstrap = () => platformBrowserDynamic() return bootstrapModule }) .catch(err => { - logger.error(err) + try { + logger.error(err) + } catch (err2) { + console.error('Cannot log error', { err, err2 }) + } + + // Ensure we display an "incompatible message" on Angular bootstrap error + setTimeout(() => { + if (document.querySelector('my-app').innerHTML === '') { + throw err + } + }, 1000) + return null }) -- cgit v1.2.3