Skip to content

Commit

Permalink
fix: Change maxCanvasSize to be optional (#183)
Browse files Browse the repository at this point in the history
To keep this compatible with prior versions, this option should be
optional. This won't affect sentry SDK, but if we want to submit this
upstream, it needs to be optional.
  • Loading branch information
billyvg authored Apr 23, 2024
2 parents 2c9e388 + c76037e commit f7867ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/rrweb/src/record/observers/canvas/canvas-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export interface CanvasManagerConstructorOptions {
blockClass: blockClass;
blockSelector: string | null;
unblockSelector: string | null;
maxCanvasSize: [number, number] | null;
maxCanvasSize?: [number, number] | null;
mirror: Mirror;
dataURLOptions: DataURLOptions;
errorHandler?: ErrorHandler;
Expand Down Expand Up @@ -177,7 +177,7 @@ export class CanvasManager implements CanvasManagerInterface {
blockClass: blockClass,
blockSelector: string | null,
unblockSelector: string | null,
maxCanvasSize: [number, number] | null,
maxCanvasSize: [number, number] | null | undefined,
options: {
dataURLOptions: DataURLOptions;
},
Expand Down Expand Up @@ -272,7 +272,7 @@ export class CanvasManager implements CanvasManagerInterface {
blockClass: blockClass,
blockSelector: string | null,
unblockSelector: string | null,
maxCanvasSize: [number, number] | null,
maxCanvasSize: [number, number] | null | undefined,
dataURLOptions: DataURLOptions,
canvasElement?: HTMLCanvasElement,
) {
Expand Down

0 comments on commit f7867ec

Please sign in to comment.