Skip to content

Commit

Permalink
✨ 消除代码异味
Browse files Browse the repository at this point in the history
  • Loading branch information
cfdxkk committed Jan 8, 2024
1 parent 85cacfa commit a420939
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pages/settings/profile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* 如果有上传图片,则开启图片裁切器(即:用户选择了本地文件的事件)
* @param e 应为用户上传文件的 input 元素的 change 事件
*/
function handleOpenAvatarCropper(e: Event | undefined) {
function handleOpenAvatarCropper(e?: Event) {
const fileInput = e?.target as HTMLInputElement | undefined;
if (fileInput?.files?.[0]) {
const image = fileInput.files[0];
Expand Down

0 comments on commit a420939

Please sign in to comment.