Update PageCommentsWebPart.ts

this.pageurl must be initialized before building pastAtachmentPath
This commit is contained in:
Sergey Shiroky 2024-03-11 16:45:07 +03:00 committed by GitHub
parent 02718649a5
commit 30eaa82cb3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -93,12 +93,12 @@ export default class PageCommentsWebPart extends BaseClientSideWebPart<IPageComm
</div>
</div>`;
var self = this;
this.pageurl = this.context.pageContext.legacyPageContext.serverRequestPath;
if (this.properties.enableAttachments) {
await this.helper.getDocLibInfo();
this.postAttachmentPath = await this.helper.getPostAttachmentFilePath(this.pageurl);
this.pageFolderExists = await this.helper.checkForPageFolder(this.postAttachmentPath);
}
this.pageurl = this.context.pageContext.legacyPageContext.serverRequestPath;
this.currentUserInfo = await this.helper.getCurrentUserInfo();
this.siteUsers = await this.helper.getSiteUsers(self.currentUserInfo.ID);
require(['jquery', './js/jquery-comments.min'], (jQuery, comments) => {