]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/main.ts
Translated using Weblate (Persian)
[github/Chocobozzz/PeerTube.git] / client / src / main.ts
index 432db0eacb92557bae45f4958efdd7f416854916..159c47e868484424e7c4052d3320f0bef4514d2b 100644 (file)
@@ -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
   })