Przeglądaj źródła

Mutate when revisionId changes

Shun Miyazawa 2 lat temu
rodzic
commit
36a32731c1
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4 0
      apps/app/src/stores/page.tsx

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

@@ -80,6 +80,10 @@ export const useSWRxCurrentPage = (initialData?: IPagePopulatedToShowRevision|nu
       return true;
     }
 
+    if (cachedData.revision?._id !== initialData.revision?._id) {
+      return true;
+    }
+
     return false;
   })();