Sfoglia il codice sorgente

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

Shun Miyazawa 3 anni fa
parent
commit
83c67c7470
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  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'));
     }