Fix bug 51815: editor favicon

This commit is contained in:
Viktor Fomin 2021-08-09 16:15:17 +03:00
parent e005a29a69
commit 634ea15ec2

View File

@ -269,18 +269,18 @@ const Editor = () => {
return isIOS && deviceType === "tablet";
};
const setFavicon = (fileType) => {
const setFavicon = (documentType) => {
const favicon = document.getElementById("favicon");
if (!favicon) return;
let icon = null;
switch (fileType) {
case "docx":
switch (documentType) {
case "text":
icon = "text.ico";
break;
case "pptx":
case "presentation":
icon = "presentation.ico";
break;
case "xlsx":
case "spreadsheet":
icon = "spreadsheet.ico";
break;
default:
@ -339,7 +339,7 @@ const Editor = () => {
docTitle = config.document.title;
fileType = config.document.fileType;
setFavicon(fileType);
setFavicon(config.documentType);
setDocumentTitle(docTitle);
if (window.innerWidth < 720) {