Skip to content

Commit 0c836e0

Browse files
committed
Simplify definition of canvasContext
1 parent fc2ac76 commit 0c836e0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Page/PageCanvas.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,7 @@ export default function PageCanvas(props: PageCanvasProps) {
109109

110110
const renderContext: RenderParameters = {
111111
annotationMode: renderForms ? ANNOTATION_MODE.ENABLE_FORMS : ANNOTATION_MODE.ENABLE,
112-
get canvasContext() {
113-
return canvas.getContext('2d', { alpha: false }) as CanvasRenderingContext2D;
114-
},
112+
canvasContext: canvas.getContext('2d', { alpha: false }) as CanvasRenderingContext2D,
115113
viewport: renderViewport,
116114
};
117115
if (canvasBackground) {

0 commit comments

Comments
 (0)