Skip to content

Commit

Permalink
re-throw in callback wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea committed Dec 20, 2023
1 parent a029ef4 commit cddf05b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/rrweb/src/record/observers/canvas/canvas-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import initCanvasContextObserver from './canvas';
import initCanvasWebGLMutationObserver from './webgl';
import ImageBitmapDataURLWorker from 'web-worker:../../workers/image-bitmap-data-url-worker.ts';
import type { ImageBitmapDataURLRequestWorker } from '../../workers/image-bitmap-data-url-worker';
import { callbackWrapper } from '../../error-handler';

export type RafStamps = { latestId: number; invokeId: number | null };

Expand Down Expand Up @@ -269,8 +270,10 @@ export class CanvasManager implements CanvasManagerInterface {
[bitmap],
);
})
.catch(() => {
// noop
.catch((error) => {
callbackWrapper(() => {
throw error;
})();
});
});
rafId = requestAnimationFrame(takeCanvasSnapshots);
Expand Down

0 comments on commit cddf05b

Please sign in to comment.