Skip to content

Commit

Permalink
fix(skxamlcanvas): [Wasm] Don't fail when the canvas can't be found (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban authored Aug 18, 2023
1 parent d5bcfdf commit 7f9951d
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@

static invalidateCanvas(pData, canvasId, width, height) {
var htmlCanvas = document.getElementById(canvasId);

if (!htmlCanvas) {
return false;
}

htmlCanvas.width = width;
htmlCanvas.height = height;

Expand Down

0 comments on commit 7f9951d

Please sign in to comment.