Bläddra i källkod

fix: Console error in dev mode due to missing font path in non-prod (#8756)

Fix console error due to missing font path in dev mode reported by Firefox.
Márk Tolmács 8 månader sedan
förälder
incheckning
7c0239e693
1 ändrade filer med 8 tillägg och 6 borttagningar
  1. 8 6
      excalidraw-app/index.html

+ 8 - 6
excalidraw-app/index.html

@@ -118,12 +118,6 @@
     <!-- Following placeholder is replaced during the build step -->
     <!-- PLACEHOLDER:EXCALIDRAW_APP_FONTS -->
 
-    <% } else { %>
-    <script>
-      window.EXCALIDRAW_ASSET_PATH = window.origin;
-    </script>
-    <% } %>
-
     <!-- Register Assistant as the UI font, before the scene inits -->
     <link
       rel="stylesheet"
@@ -131,6 +125,12 @@
       type="text/css"
     />
 
+    <% } else { %>
+    <script>
+      window.EXCALIDRAW_ASSET_PATH = window.origin;
+    </script>
+    <% } %>
+
     <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
     <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
     <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
@@ -212,6 +212,7 @@
     </header>
     <div id="root"></div>
     <script type="module" src="index.tsx"></script>
+    <% if (typeof PROD != 'undefined' && PROD == true) { %>
     <!-- 100% privacy friendly analytics -->
     <script>
       // need to load this script dynamically bcs. of iframe embed tracking
@@ -244,5 +245,6 @@
       }
     </script>
     <!-- end LEGACY GOOGLE ANALYTICS -->
+    <% } %>
   </body>
 </html>