fix: put guard around sentry init (#1547)
This commit is contained in:
@@ -1,58 +1,70 @@
|
|||||||
<!doctype html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>Outline</title>
|
||||||
|
<meta name="slack-app-id" content="//inject-slack-app-id//" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<link
|
||||||
|
rel="shortcut icon"
|
||||||
|
type="image/png"
|
||||||
|
href="favicon-32.png"
|
||||||
|
sizes="32x32"
|
||||||
|
/>
|
||||||
|
<link rel="manifest" href="/manifest.json" />
|
||||||
|
<link
|
||||||
|
rel="search"
|
||||||
|
type="application/opensearchdescription+xml"
|
||||||
|
href="/opensearch.xml"
|
||||||
|
title="Outline"
|
||||||
|
/>
|
||||||
|
<style>
|
||||||
|
body,
|
||||||
|
html {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
<head>
|
body {
|
||||||
<title>Outline</title>
|
display: flex;
|
||||||
<meta name="slack-app-id" content="//inject-slack-app-id//" />
|
width: 100%;
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
height: 100%;
|
||||||
<link rel="shortcut icon" type="image/png" href="favicon-32.png" sizes="32x32" />
|
}
|
||||||
<link rel="manifest" href="/manifest.json" />
|
|
||||||
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Outline" />
|
|
||||||
<style>
|
|
||||||
body,
|
|
||||||
html {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
#root {
|
||||||
display: flex;
|
flex: 1;
|
||||||
width: 100%;
|
min-height: 100vh;
|
||||||
height: 100%;
|
}
|
||||||
}
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
#root {
|
<body>
|
||||||
flex: 1;
|
<div id="root"></div>
|
||||||
min-height: 100vh;
|
<script>
|
||||||
}
|
//inject-env//
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div id="root"></div>
|
|
||||||
<script>//inject-env//</script>
|
|
||||||
<script src="https://browser.sentry-cdn.com/5.22.3/bundle.min.js"
|
|
||||||
integrity="sha384-A1qzcXXJWl+bzYr+r8AdFzSaLbdcbYRFmG37MEDKr4EYjtraUyoZ6UiMw31jHcV9" crossorigin="anonymous">
|
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script
|
||||||
if ('//inject-sentry-dsn//') {
|
src="https://browser.sentry-cdn.com/5.22.3/bundle.min.js"
|
||||||
Sentry.init({
|
integrity="sha384-A1qzcXXJWl+bzYr+r8AdFzSaLbdcbYRFmG37MEDKr4EYjtraUyoZ6UiMw31jHcV9"
|
||||||
dsn: '//inject-sentry-dsn//',
|
crossorigin="anonymous"
|
||||||
ignoreErrors: [
|
></script>
|
||||||
'AuthorizationError',
|
<script>
|
||||||
'NetworkError',
|
if ("//inject-sentry-dsn//" && window.Sentry) {
|
||||||
'NotFoundError',
|
window.Sentry.init({
|
||||||
'OfflineError',
|
dsn: "//inject-sentry-dsn//",
|
||||||
'UpdateRequiredError',
|
ignoreErrors: [
|
||||||
'ChunkLoadError'
|
"AuthorizationError",
|
||||||
],
|
"NetworkError",
|
||||||
});
|
"NotFoundError",
|
||||||
}
|
"OfflineError",
|
||||||
|
"UpdateRequiredError",
|
||||||
|
"ChunkLoadError",
|
||||||
|
],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (window.localStorage.getItem("theme") === "dark") {
|
if (window.localStorage.getItem("theme") === "dark") {
|
||||||
window.document.querySelector('#root').style.background = "#111319";
|
window.document.querySelector("#root").style.background = "#111319";
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
</html>
|
||||||
</html>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user