Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
review comments
  • Loading branch information
s1gr1d committed Oct 22, 2024
commit f4384778d1a4e2ad582992993a96de1796e3e800
3 changes: 2 additions & 1 deletion packages/nuxt/src/runtime/plugins/sentry.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,15 @@ export default defineNuxtPlugin({
if (clientOptions && 'trackPinia' in clientOptions && clientOptions.trackPinia) {
if ('$pinia' in nuxtApp) {
(nuxtApp.$pinia as { use: (plugin: unknown) => void }).use(
// `trackPinia` is an object with custom options or `true` (pass `undefined` to use default options)
createSentryPiniaPlugin(clientOptions.trackPinia === true ? undefined : clientOptions.trackPinia),
);
} else {
clientOptions.debug &&
consoleSandbox(() => {
// eslint-disable-next-line no-console
console.warn(
'[Sentry] You set `trackPinia`, but the Pinia was not found. Make sure to add `"@pinia/nuxt"` to your modules array.',
'[Sentry] You set `trackPinia`, but the Pinia module was not found. Make sure to add `"@pinia/nuxt"` to your modules array.',
);
});
}
Expand Down