Merge branch 'feature/static-versioned' of https://github.com/ONLYOFFICE/DocSpace into feature/static-versioned

This commit is contained in:
Timofey Boyko 2023-01-20 10:14:58 +03:00
commit 10611fc98d
3 changed files with 5 additions and 9 deletions

View File

@ -4,11 +4,7 @@
"main": "index.js", "main": "index.js",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"build": "echo 'skip it'", "start": "node src/index.js"
"clean": "echo 'skip it'",
"deploy": "echo 'skip it'",
"start": "echo 'skip it'",
"start-prod": "echo 'skip it'"
}, },
"dependencies": { "dependencies": {
"crypto": "^1.0.1", "crypto": "^1.0.1",

View File

@ -28,12 +28,12 @@ const App = ({ initialLanguage, initialI18nStoreASC, setTheme, ...rest }) => {
const [isInitialized, isErrorLoading] = useMfScripts(); const [isInitialized, isErrorLoading] = useMfScripts();
useSSR(initialI18nStoreASC, initialLanguage); useSSR(initialI18nStoreASC, initialLanguage);
console.log(rest); //console.log(rest);
useEffect(() => { useEffect(() => {
let icon = ""; let icon = "";
switch (rest.config.documentType) { switch (rest?.config?.documentType) {
case "word": case "word":
icon = TextIcoUrl; icon = TextIcoUrl;
break; break;
@ -54,7 +54,7 @@ const App = ({ initialLanguage, initialI18nStoreASC, setTheme, ...rest }) => {
} }
console.log(icon); console.log(icon);
}, [rest.config.documentType]); }, [rest?.config?.documentType]);
useEffect(() => { useEffect(() => {
const tempElm = document.getElementById("loader"); const tempElm = document.getElementById("loader");

View File

@ -543,7 +543,7 @@ function Editor({
} }
if (successAuth) { if (successAuth) {
const documentType = config.documentType; const documentType = config?.documentType;
const fileExt = const fileExt =
documentType === "word" documentType === "word"