Skip to content

Commit

Permalink
Use textContent instead of innerHTML
Browse files Browse the repository at this point in the history
  • Loading branch information
binos30 committed Feb 29, 2024
1 parent 2386ab1 commit ffbbb5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const App = () => {
useEffect(() => {
const date = new Date();
const yearElement = document.getElementById("current-year");
yearElement && (yearElement.innerHTML = date.getFullYear().toString());
yearElement && (yearElement.textContent = date.getFullYear().toString());
}, []);

return (
Expand Down

0 comments on commit ffbbb5a

Please sign in to comment.