Skip to content

Commit

Permalink
Add cache to effect dependencies
Browse files Browse the repository at this point in the history
not sure if needed since also works without but probably safer to have than not
  • Loading branch information
ekzyis committed Dec 31, 2024
1 parent bf23727 commit 662e0e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export default function Comment ({
ref.current.classList.add('outline-it')
}, 100)
}
}, [item.id, router.query.commentId])
}, [item.id, cache, router.query.commentId])

useEffect(() => {
if (router.query.commentsViewedAt &&
Expand Down

0 comments on commit 662e0e5

Please sign in to comment.