Skip to content

Commit

Permalink
Use document.createElement to eliminate type assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb531 committed May 27, 2024
1 parent b704682 commit 952fde9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jcanvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4277,7 +4277,7 @@ $.fn.createPattern = function createPattern(args) {
if (isFunction(source)) {
// Draw pattern using function if given

img = $("<canvas />")[0] as HTMLCanvasElement;
img = document.createElement("canvas");
img.width = params.width || 0;
img.height = params.height || 0;
const imgCtx = _getContext(img);
Expand Down

0 comments on commit 952fde9

Please sign in to comment.