From 9a59b7496e99b40e39dc4e05bcca23066050bad1 Mon Sep 17 00:00:00 2001 From: Thomas Steiner Date: Thu, 16 Apr 2020 17:27:23 +0200 Subject: [PATCH] Only load PWACompat when we really need it (#1439) --- src/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/index.tsx b/src/index.tsx index c78ba451..bf6e6cf3 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -13,7 +13,10 @@ import "./css/styles.scss"; // On Apple mobile devices add the proprietary app icon and splashscreen markup. // No one should have to do this manually, and eventually this annoyance will // go away once https://bugs.webkit.org/show_bug.cgi?id=183937 is fixed. -if (/\b(iPad|iPhone|iPod)\b/.test(navigator.userAgent)) { +if ( + /\b(iPad|iPhone|iPod)\b/.test(navigator.userAgent) && + !matchMedia("(display-mode: standalone)").matches +) { import("pwacompat"); }