Răsfoiți Sursa

add isAbleToKnowAttachedPageInformation

itizawa 5 ani în urmă
părinte
comite
5c0c6a33b2
1 a modificat fișierele cu 3 adăugiri și 2 ștergeri
  1. 3 2
      src/client/js/services/PageContainer.js

+ 3 - 2
src/client/js/services/PageContainer.js

@@ -105,9 +105,10 @@ export default class PageContainer extends Container {
     this.checkAndUpdateImageUrlCached(this.state.likerUsers);
     this.checkAndUpdateImageUrlCached(this.state.likerUsers);
 
 
     const { currentUser } = this.appContainer;
     const { currentUser } = this.appContainer;
+    // see https://dev.growi.org/5fabddf8bbeb1a0048bcb9e9
+    const isAbleToKnowAttachedPageInformation = this.state.pageId != null || !(currentUser == null && this.state.isSharedPage);
 
 
-    // retrieve information when the page exists and the user is logged in
-    if (currentUser != null && this.state.pageId != null) {
+    if (isAbleToKnowAttachedPageInformation) {
       this.retrieveSeenUsers();
       this.retrieveSeenUsers();
       this.retrieveLikeInfo();
       this.retrieveLikeInfo();
       this.retrieveBookmarkInfo();
       this.retrieveBookmarkInfo();