Skip to content

Commit

Permalink
Merge pull request #569 from felix-berlin/bugfix/Cannot-access-'p'-be…
Browse files Browse the repository at this point in the history
…fore-initialization

fix: FE errors after thirdPartyErrorFilterIntegration setup
  • Loading branch information
felix-berlin authored Aug 10, 2024
2 parents 8345a04 + abf8e65 commit 922056a
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 24 deletions.
4 changes: 3 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ export default defineConfig({
script: {
propsDestructure: true,
},
devtools: {
launchEditor: "code",
},
}),
sitemap({
lastmod: new Date(),
Expand Down Expand Up @@ -230,7 +233,6 @@ export default defineConfig({
authToken: SENTRY_AUTH_TOKEN,
org: SENTRY_ORG,
project: SENTRY_PROJECT,
applicationKey: "berliner-schnauze",
}),
codecovVitePlugin({
enableBundleAnalysis: CODECOV_TOKEN !== undefined,
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
"@vitest/ui": "^2.0.5",
"@vitest/web-worker": "^2.0.5",
"@vue/compiler-sfc": "^3.4.37",
"@vue/devtools-api": "^6.6.3",
"@vue/test-utils": "^2.4.6",
"astro-eslint-parser": "^1.0.2",
"autoprefixer": "^10.4.20",
Expand Down
6 changes: 2 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/components/BaseHead.astro
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,12 @@ const { title, seo } = Astro.props as SeoProps & Title;

<link rel="preconnect" href="//cms.berliner-schnauze.wtf" />

<script src="../plugins/sentryBrowser.ts"></script>

<SetColorMode />

<ViewTransitions />

<script src="../plugins/sentryBrowser.ts"></script>
<script src="/src/lib/unsupportedBrowser.ts"></script>

{pwaInfo && <Fragment set:html={pwaInfo.webManifest.linkTag} />}
Expand Down
17 changes: 1 addition & 16 deletions src/plugins/sentryBrowser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,7 @@ Sentry.init({
// Alternatively, use `process.env.npm_package_version` for a dynamic release version
// if your build tool supports it.
release: version,
integrations: [
Sentry.browserTracingIntegration({ enableInp: true }),
Sentry.replayIntegration(),
Sentry.thirdPartyErrorFilterIntegration({
// Specify the application keys that you specified in the Sentry bundler plugin
filterKeys: ["berliner-schnauze"],

// Defines how to handle errors that contain third party stack frames.
// Possible values are:
// - 'drop-error-if-contains-third-party-frames'
// - 'drop-error-if-exclusively-contains-third-party-frames'
// - 'apply-tag-if-contains-third-party-frames'
// - 'apply-tag-if-exclusively-contains-third-party-frames'
behaviour: "apply-tag-if-exclusively-contains-third-party-frames",
}),
],
integrations: [Sentry.browserTracingIntegration({ enableInp: true }), Sentry.replayIntegration()],

// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
Expand Down
4 changes: 3 additions & 1 deletion src/stores/toastNotify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ export const createToastNotify = (payload: ToastPayload): void => {
*
* @return {void}
*/
export const removeToastById = (id: number): void => {
export const removeToastById = (
id: number | `${string}-${string}-${string}-${string}-${string}`,
): void => {
const currentToast = $toastNotify.get().find((t) => t.id === id);

hidePopover(currentToast?.id);
Expand Down

0 comments on commit 922056a

Please sign in to comment.