Skip to content

Commit

Permalink
fix: type error
Browse files Browse the repository at this point in the history
  • Loading branch information
DDMeaqua committed Sep 9, 2024
1 parent f219515 commit 7804182
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/components/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,7 @@ function _Chat() {
const [showShortcutKeyModal, setShowShortcutKeyModal] = useState(false);

useEffect(() => {
const handleKeyDown = (event) => {
const handleKeyDown = (event: any) => {
// 打开新聊天 command + shift + o
if (
(event.metaKey || event.ctrlKey) &&
Expand All @@ -1453,7 +1453,8 @@ function _Chat() {
event.code === "Semicolon"
) {
event.preventDefault();
const copyCodeButton = document.querySelectorAll(".copy-code-button");
const copyCodeButton =
document.querySelectorAll<HTMLElement>(".copy-code-button");
if (copyCodeButton.length > 0) {
copyCodeButton[copyCodeButton.length - 1].click();
}
Expand Down

0 comments on commit 7804182

Please sign in to comment.