Browse Source

Merge pull request #3082 from weseek/fix/4302-4417-count-bookmark-at-shared-page

Fix/4302 4417 count bookmark at shared page
Yuki Takei 5 years ago
parent
commit
ec4c4b65a8
1 changed files with 5 additions and 2 deletions
  1. 5 2
      src/client/js/services/PageContainer.js

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

@@ -104,8 +104,11 @@ export default class PageContainer extends Container {
     this.initStateMarkdown();
     this.initStateMarkdown();
     this.checkAndUpdateImageUrlCached(this.state.likerUsers);
     this.checkAndUpdateImageUrlCached(this.state.likerUsers);
 
 
-    // skip if shared page or new page
-    if (this.state.shareLinkId == null && this.state.pageId != null) {
+    const { currentUser } = this.appContainer;
+    // see https://dev.growi.org/5fabddf8bbeb1a0048bcb9e9
+    const isAbleToGetAttachedInformationAboutPages = this.state.pageId != null || !(currentUser == null && this.state.isSharedPage);
+
+    if (isAbleToGetAttachedInformationAboutPages) {
       this.retrieveSeenUsers();
       this.retrieveSeenUsers();
       this.retrieveLikeInfo();
       this.retrieveLikeInfo();
       this.retrieveBookmarkInfo();
       this.retrieveBookmarkInfo();