mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-27 19:02:23 +08:00
feat(mobile): ios oauth & magic-link login (#8581)
Co-authored-by: EYHN <cneyhn@gmail.com>
This commit is contained in:
@@ -18,6 +18,15 @@ import { App } from './app';
|
||||
|
||||
function main() {
|
||||
if (BUILD_CONFIG.debug || window.SENTRY_RELEASE) {
|
||||
// workaround for Capacitor HttpPlugin
|
||||
// capacitor-http-plugin will replace window.XMLHttpRequest with its own implementation
|
||||
// but XMLHttpRequest.prototype is not defined which is used by sentry
|
||||
// see: https://github.com/ionic-team/capacitor/blob/74c3e9447e1e32e73f818d252eb12f453d849e8d/core/native-bridge.ts#L581
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user