From 12d653a014571219f56f16e94621c59af52af017 Mon Sep 17 00:00:00 2001
From: esikkala <esko.ikkala@aalto.fi>
Date: Wed, 16 Jun 2021 09:45:52 +0300
Subject: [PATCH] Add workaround for SharedArrayBuffer - Chrome warning:
 SharedArrayBuffer will require cross-origin isolation as of M91

---
 src/client/index.html | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/client/index.html b/src/client/index.html
index a9dddd2f..58349cea 100644
--- a/src/client/index.html
+++ b/src/client/index.html
@@ -1,6 +1,9 @@
 <!DOCTYPE html>
 <html>
-
+  <script>
+    // See https://github.com/facebook/react/issues/20829#issuecomment-802088260
+    if (!crossOriginIsolated) SharedArrayBuffer = ArrayBuffer;
+  </script>
 <head>
   <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
   <meta name="viewport" content="width=device-width, initial-scale=1">
-- 
GitLab