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