Skip to content

Commit

Permalink
fix(blazorui): resolve undefined canvas element issues in BitPdfReader
Browse files Browse the repository at this point in the history
  • Loading branch information
msynk authored Dec 14, 2024
1 parent b3763f6 commit 381ed19
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ namespace BitBlazorUI {
canvas = document.getElementById(`${config.id}-${pageNumber}`) as HTMLCanvasElement;
}

if (!canvas) return;

const context = canvas.getContext('2d')!;
canvas.width = viewport.width;
canvas.height = viewport.height;
Expand Down

0 comments on commit 381ed19

Please sign in to comment.