Skip to content

Commit

Permalink
feat: (#683) 파일이 없을 때 얼리 리턴하도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Gilpop8663 committed Sep 22, 2023
1 parent 3229db3 commit 22071b1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frontend/src/hooks/useContentImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export const useContentImage = (imageUrl: string = '') => {
const handlePasteImage = (event: ClipboardEvent<HTMLTextAreaElement>) => {
const file = event.clipboardData.files[0];

if (!file) return;

if (file.type.slice(0, 5) === 'image') {
event.preventDefault();

Expand Down

0 comments on commit 22071b1

Please sign in to comment.