Skip to content

Commit

Permalink
fix: return if key canvas functions do not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
hmerritt committed Feb 11, 2024
1 parent 86db6b8 commit 1f8d793
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/view/components/experimental/DotGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ export const DotGrid: React.FC<DotGridProps> = ({
resetAnimationFrame();

const canvas = $canvas.current;
const ctx = canvas.getContext("2d");
if (!canvas?.getContext) return; // Tests fail without this

const ctx = canvas?.getContext("2d");

// Set canvas size
if (refForMousePosition === "window") {
Expand Down

0 comments on commit 1f8d793

Please sign in to comment.