File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ type PiniaPlugin = (context: {
1212
1313type SentryPiniaPluginOptions = {
1414 attachPiniaState ?: boolean ;
15+ addBreadcrumbs ?: boolean ;
1516 actionTransformer ?: ( action : any ) => any ;
1617 stateTransformer ?: ( state : any ) => any ;
1718} ;
@@ -48,10 +49,14 @@ export const createSentryPiniaPlugin: (options?: SentryPiniaPluginOptions) => Pi
4849 store . $onAction ( context => {
4950 context . after ( ( ) => {
5051 const transformedActionName = options . actionTransformer
51- ? options . actionTransformer ( context . name ) || ''
52+ ? options . actionTransformer ( context . name )
5253 : context . name ;
5354
54- if ( typeof transformedActionName !== 'undefined' && transformedActionName !== null ) {
55+ if (
56+ typeof transformedActionName !== 'undefined' &&
57+ transformedActionName !== null &&
58+ options . addBreadcrumbs !== false
59+ ) {
5560 addBreadcrumb ( {
5661 category : 'action' ,
5762 message : transformedActionName ,
You can’t perform that action at this time.
0 commit comments