Procházet zdrojové kódy

Do not toast in case of this error because debounce process may be executed after the renaming process is completed

Shun Miyazawa před 3 roky
rodič
revize
83c67c7470
1 změnil soubory, kde provedl 4 přidání a 0 odebrání
  1. 4 0
      packages/app/src/components/PageRenameModal.tsx

+ 4 - 0
packages/app/src/components/PageRenameModal.tsx

@@ -139,6 +139,10 @@ const PageRenameModal = (): JSX.Element => {
       setExistingPaths(existPaths);
     }
     catch (err) {
+      // Do not toast in case of this error because debounce process may be executed after the renaming process is completed.
+      if (err.length === 1 && err[0].message === 'fromPage is Null') {
+        return;
+      }
       setErrs(err);
       toastError(t('modal_rename.label.Failed to get exist path'));
     }