nuxt-community / sentry-module

Sentry module for Nuxt 2
https://sentry.nuxtjs.org
MIT License
500 stars 113 forks source link

fix(lazy): avoid crash on using mocked instance after real one loaded #606

Closed rchl closed 1 year ago

rchl commented 1 year ago

When using lazy: true, It was possible for someone to hold a reference to a mocked Sentry object after the real Sentry has loaded and call a method on the mocked instance which caused a crash. Make this case not crash by updating mocked methods to redirect to the real instance.

@tomlewis0

github-actions[bot] commented 1 year ago

size-limit report 📦

Path Size
fixture: base 372.55 KB (0%)
fixture: lazy 377.14 KB (+0.04% 🔺)
fixture: tracing 391.9 KB (0%)
fixture: lazy+tracing 396.48 KB (+0.04% 🔺)