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

add isAbleToKnowAttachedPageInformation

itizawa 5 лет назад
Родитель
Сommit
5c0c6a33b2
1 измененных файлов с 3 добавлено и 2 удалено
  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);
 
     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.retrieveLikeInfo();
       this.retrieveBookmarkInfo();