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 @@ -73,7 +73,20 @@ export const _replayCanvasIntegration = ((options: Partial<ReplayCanvasOptions>
73
73
enableManualSnapshot,
74
74
recordCanvas : true ,
75
75
getCanvasManager : ( options : CanvasManagerOptions ) => {
76
- const manager = new CanvasManager ( { ...options , enableManualSnapshot } ) ;
76
+ const manager = new CanvasManager ( {
77
+ ...options ,
78
+ enableManualSnapshot,
79
+ errorHandler : ( err : unknown ) => {
80
+ try {
81
+ if ( typeof err === 'object' ) {
82
+ ( err as Error & { __rrweb__ ?: boolean } ) . __rrweb__ = true ;
83
+ }
84
+ } catch ( error ) {
85
+ // ignore errors here
86
+ // this can happen if the error is frozen or does not allow mutation for other reasons
87
+ }
88
+ } ,
89
+ } ) ;
77
90
canvasManagerResolve ( manager ) ;
78
91
return manager ;
79
92
} ,
You can’t perform that action at this time.
0 commit comments