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>
7373 enableManualSnapshot,
7474 recordCanvas : true ,
7575 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+ } ) ;
7790 canvasManagerResolve ( manager ) ;
7891 return manager ;
7992 } ,
You can’t perform that action at this time.
0 commit comments