Skip to content

Commit

Permalink
chore(mobile): workaround for sentry reading XHR.prototype
Browse files Browse the repository at this point in the history
  • Loading branch information
CatsJuice committed Oct 23, 2024
1 parent 62f92b0 commit ccd6047
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/frontend/apps/ios/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ import { App } from './app';

function main() {
if (BUILD_CONFIG.debug || window.SENTRY_RELEASE) {
// TODO: workaround
if ('CapacitorWebXMLHttpRequest' in window) {
window.XMLHttpRequest.prototype = (
window.CapacitorWebXMLHttpRequest as any
).prototype;
}
// https://docs.sentry.io/platforms/javascript/guides/react/#configure
init({
dsn: process.env.SENTRY_DSN,
Expand Down

0 comments on commit ccd6047

Please sign in to comment.