Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
rwv committed Nov 18, 2023
1 parent 86aab3f commit 5fec331
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils/scan-renderer/canvas-scan/scan-canvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ export async function scanCanvas(
}

// Note: Hack to get around TS error
const ctx = canvas.getContext('2d') as CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D
const ctx = canvas.getContext('2d') as
| CanvasRenderingContext2D
| OffscreenCanvasRenderingContext2D
if (!ctx) {
throw new Error('Canvas not supported')
}
Expand Down

0 comments on commit 5fec331

Please sign in to comment.