Web: Doceditor: fixed name of global state
This commit is contained in:
parent
a0317e1ba5
commit
f4f8cc42f5
@ -3,14 +3,14 @@ import { hydrate } from "react-dom";
|
|||||||
import { registerSW } from "@appserver/common/sw/helper";
|
import { registerSW } from "@appserver/common/sw/helper";
|
||||||
import App from "../App.js";
|
import App from "../App.js";
|
||||||
|
|
||||||
const propsObj = window.__STATE__;
|
const propsObj = window.__ASC_INITIAL_STATE__;
|
||||||
delete window.__STATE__;
|
delete window.__ASC_INITIAL_STATE__;
|
||||||
|
|
||||||
const stateJS = document.getElementById("__STATE__");
|
const stateJS = document.getElementById("__ASC_INITIAL_STATE__");
|
||||||
//stateJS.parentNode.removeChild(stateJS);
|
stateJS.parentNode.removeChild(stateJS);
|
||||||
|
|
||||||
const { props } = propsObj;
|
const { props } = propsObj;
|
||||||
console.log(props);
|
|
||||||
hydrate(<App {...props} />, document.getElementById("root"));
|
hydrate(<App {...props} />, document.getElementById("root"));
|
||||||
|
|
||||||
registerSW();
|
registerSW();
|
||||||
|
@ -8,8 +8,8 @@ export default function template(
|
|||||||
const { docApiUrl } = initialState.props;
|
const { docApiUrl } = initialState.props;
|
||||||
|
|
||||||
const scripts = `
|
const scripts = `
|
||||||
<script id="__STATE__">
|
<script id="__ASC_INITIAL_STATE__">
|
||||||
window.__STATE__ = ${JSON.stringify(initialState)}
|
window.__ASC_INITIAL_STATE__ = ${JSON.stringify(initialState)}
|
||||||
</script>
|
</script>
|
||||||
<script type='text/javascript' id='scripDocServiceAddress' src="${docApiUrl}" async></script>
|
<script type='text/javascript' id='scripDocServiceAddress' src="${docApiUrl}" async></script>
|
||||||
${scriptTags}
|
${scriptTags}
|
||||||
|
Loading…
Reference in New Issue
Block a user