Просмотр исходного кода

Modified the code based off the FB about the case where currentPageId is null

Shunm634-source 3 лет назад
Родитель
Сommit
7082c3cfe9
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      packages/app/src/components/RevisionComparer/RevisionComparer.jsx

+ 4 - 0
packages/app/src/components/RevisionComparer/RevisionComparer.jsx

@@ -63,6 +63,10 @@ const RevisionComparer = (props) => {
     isNodiff = sourceRevision._id === targetRevision._id;
   }
 
+  if (currentPageId == null || currentPagePath == null) {
+    return <>{ t('not_found_page.page_not_exist')}</>;
+  }
+
   return (
     <div className="revision-compare">
       <div className="d-flex">