feat(plugins/no-track): log attempts to set __SENTRY__ in dev builds

This commit is contained in:
PalmDevs 2026-04-07 22:36:08 +07:00
parent 76a6072582
commit 46440ffdde
No known key found for this signature in database
GPG key ID: 6FAE8F8677ACA8BA

View file

@ -5,6 +5,7 @@ import { instead } from '@revenge-mod/patcher'
import { InternalPluginFlags, registerPlugin } from '@revenge-mod/plugins/_'
import { PluginFlags } from '@revenge-mod/plugins/constants'
import { noop } from '@revenge-mod/utils/callback'
import { getCurrentStack } from '@revenge-mod/utils/error'
const cachedOnly = {
cached: true,
@ -110,7 +111,10 @@ registerPlugin(
Object.defineProperty(globalThis, '__SENTRY__', {
configurable: false,
get: getFakeCarrier,
set: getFakeCarrier,
set: () => {
if (__DEV__) warnSetSentry(getCurrentStack())
return getFakeCarrier()
},
})
cleanup(unsubSU, unsubSIU, unsubSentryInst)