From e84fd4b3ff8652a21a7b0ad4481c6196e66715f4 Mon Sep 17 00:00:00 2001 From: Ilya Oleshko Date: Fri, 24 Jun 2022 13:11:00 +0300 Subject: [PATCH] Web: Files: Fixed integration configuration checking --- products/ASC.Files/Client/src/pages/Home/index.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/products/ASC.Files/Client/src/pages/Home/index.js b/products/ASC.Files/Client/src/pages/Home/index.js index 94ad73b2cc..c2f7876e76 100644 --- a/products/ASC.Files/Client/src/pages/Home/index.js +++ b/products/ASC.Files/Client/src/pages/Home/index.js @@ -56,6 +56,8 @@ class PureHome extends React.Component { localStorage.removeItem("isFirstUrl"); } + this.frameConfig = JSON.parse(localStorage.getItem("dsFrameConfig")); + const reg = new RegExp(`${homepage}((/?)$|/filter)`, "gmi"); //TODO: Always find? const match = window.location.pathname.match(reg); let filterObj = null; @@ -313,11 +315,11 @@ class PureHome extends React.Component { snackbarExist, } = this.props; - const frameConfig = JSON.parse(localStorage.getItem("dsFrameConfig")); - - const isFrame = frameConfig && window.name === frameConfig.name; - const showTitle = frameConfig && JSON.parse(frameConfig.showTitle); - const showFilter = frameConfig && JSON.parse(frameConfig.showFilter); + const isFrame = this.frameConfig && window.name === this.frameConfig.name; + const showTitle = + this.frameConfig && JSON.parse(this.frameConfig.showTitle); + const showFilter = + this.frameConfig && JSON.parse(this.frameConfig.showFilter); return ( <> @@ -435,6 +437,7 @@ export default inject( getFileInfo, gallerySelected, setIsUpdatingRowItem, + filesList, } = filesStore; const { id, setAction } = fileActionStore; @@ -541,6 +544,8 @@ export default inject( gallerySelected, setAction, setIsUpdatingRowItem, + + filesList, }; } )(withRouter(observer(Home)));