소스 검색

Add await to wait for an exception thrown by an async process.

Tatsuya Ise 2 년 전
부모
커밋
83db136991
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      apps/app/src/components/TreeItem/NewPageInput/NewPageInput.tsx

+ 1 - 1
apps/app/src/components/TreeItem/NewPageInput/NewPageInput.tsx

@@ -40,7 +40,7 @@ export const NewPageInput: FC<Props> = (props) => {
     }
 
     try {
-      onSubmit?.(newPagePath);
+      await onSubmit?.(newPagePath);
       toastSuccess(t('successfully_saved_the_page'));
     }
     catch (err) {