From f4f8cc42f51931a28e13c57c7028898a1fe7875d Mon Sep 17 00:00:00 2001 From: Artem Tarasov Date: Wed, 9 Mar 2022 12:59:09 +0300 Subject: [PATCH] Web: Doceditor: fixed name of global state --- web/ASC.Web.Editor/src/client/index.js | 10 +++++----- web/ASC.Web.Editor/src/server/template.js | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/web/ASC.Web.Editor/src/client/index.js b/web/ASC.Web.Editor/src/client/index.js index a6998e158e..526bb9d074 100644 --- a/web/ASC.Web.Editor/src/client/index.js +++ b/web/ASC.Web.Editor/src/client/index.js @@ -3,14 +3,14 @@ import { hydrate } from "react-dom"; import { registerSW } from "@appserver/common/sw/helper"; import App from "../App.js"; -const propsObj = window.__STATE__; -delete window.__STATE__; +const propsObj = window.__ASC_INITIAL_STATE__; +delete window.__ASC_INITIAL_STATE__; -const stateJS = document.getElementById("__STATE__"); -//stateJS.parentNode.removeChild(stateJS); +const stateJS = document.getElementById("__ASC_INITIAL_STATE__"); +stateJS.parentNode.removeChild(stateJS); const { props } = propsObj; -console.log(props); + hydrate(, document.getElementById("root")); registerSW(); diff --git a/web/ASC.Web.Editor/src/server/template.js b/web/ASC.Web.Editor/src/server/template.js index 77f2e9ac72..72e3fbf7ce 100644 --- a/web/ASC.Web.Editor/src/server/template.js +++ b/web/ASC.Web.Editor/src/server/template.js @@ -8,8 +8,8 @@ export default function template( const { docApiUrl } = initialState.props; const scripts = ` - ${scriptTags}