File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
packages/replay-canvas/src Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,20 @@ export const _replayCanvasIntegration = ((options: Partial<ReplayCanvasOptions>
75
75
enableManualSnapshot,
76
76
recordCanvas : true ,
77
77
getCanvasManager : ( options : CanvasManagerOptions ) => {
78
- const manager = new CanvasManager ( { ...options , enableManualSnapshot } ) ;
78
+ const manager = new CanvasManager ( {
79
+ ...options ,
80
+ enableManualSnapshot,
81
+ errorHandler : ( err : unknown ) => {
82
+ try {
83
+ if ( typeof err === 'object' ) {
84
+ ( err as Error & { __rrweb__ ?: boolean } ) . __rrweb__ = true ;
85
+ }
86
+ } catch ( error ) {
87
+ // ignore errors here
88
+ // this can happen if the error is frozen or does not allow mutation for other reasons
89
+ }
90
+ } ,
91
+ } ) ;
79
92
canvasManagerResolve ( manager ) ;
80
93
return manager ;
81
94
} ,
You can’t perform that action at this time.
0 commit comments