Skip to content

Commit

Permalink
fix uncatch
Browse files Browse the repository at this point in the history
  • Loading branch information
XueMoMo committed Dec 23, 2024
1 parent acee96e commit 33a32bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,6 @@ export const copyTextToClipboard = async (text?: string) => {
export const scrollToTop = () => {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
document.getElementsByClassName('overflow')[0]!.scrollLeft = 0;
const overflow = document.getElementsByClassName('overflow')[0];
overflow && (overflow.scrollLeft = 0);
};

0 comments on commit 33a32bf

Please sign in to comment.