Skip to content

Commit

Permalink
[fix] ctx might be null
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianvrj committed Sep 2, 2024
1 parent ae6e098 commit 3b15fd4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frontend/gostarkme-web/animations/StardustAnimation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ export const StardustAnimation = () => {

useEffect(() => {
const canvas = canvasRef.current;
if (canvas == null) return;
const ctx = canvas.getContext('2d');
if (ctx == null) return;
let animationFrameId: number;

// Set canvas size
Expand Down

0 comments on commit 3b15fd4

Please sign in to comment.