Merge branch 'hotfix/v2.0.1' of github.com:ONLYOFFICE/DocSpace-client into hotfix/v2.0.1

This commit is contained in:
Timofey Boyko 2023-12-05 12:27:53 +03:00
commit 97324d3572

View File

@ -24,6 +24,8 @@ import {
//@ts-ignore //@ts-ignore
import toastr from "@docspace/components/toast/toastr"; import toastr from "@docspace/components/toast/toastr";
const DEFAULT_FILE_EXTS = "file";
export const convertFoldersToItems = ( export const convertFoldersToItems = (
folders: any, folders: any,
disabledItems: any[], disabledItems: any[],
@ -87,11 +89,12 @@ export const convertFilesToItems = (
fileExst, fileExst,
} = file; } = file;
let icon = getIcon(32, fileExst); const icon = getIcon(32, fileExst || DEFAULT_FILE_EXTS);
const label = title.replace(fileExst, "") || fileExst;
return { return {
id, id,
label: title.replace(fileExst, ""), label,
title, title,
icon, icon,
security, security,