Yuki Takei 2 лет назад
Родитель
Сommit
32ddba8674
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      apps/app/src/stores/page.tsx

+ 4 - 1
apps/app/src/stores/page.tsx

@@ -74,9 +74,12 @@ export const useSWRxCurrentPage = (initialData?: IPagePopulatedToShowRevision|nu
       return true;
     }
 
-    if (initialData.revision?._id !== cachedData?.revision?._id) {
+    // mutate when the empty page has updated
+    if (cachedData?.revision == null && initialData.revision != null) {
       return true;
     }
+
+    return false;
   })();
 
   useEffect(() => {