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
…2563)

(cherry picked from commit 7f9951d)
  • Loading branch information
jeromelaban authored and github-actions[bot] committed Aug 18, 2023
1 parent d5c3b7b commit 9a47e09
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 9a47e09

Please sign in to comment.