fix: 修复文件管理没有文件时控制台报错

Closes #IAFDB0
This commit is contained in:
2024-07-24 22:41:22 +08:00
parent 5c09011077
commit bad6e30e41

View File

@@ -91,7 +91,7 @@ const getStatisticsData = async () => {
unit: formatSize[1],
data: []
}
resData.data.forEach((fs: FileStatisticsResp) => {
resData.data?.forEach((fs: FileStatisticsResp) => {
const matchedItem = FileTypeList.find((item) => item.value === fs.type)
chartData.value.unshift({
name: matchedItem ? matchedItem.name : '',