fix: 修复模板分类API的Set迭代问题和UploadModal的useEffect依赖
Some checks failed
CI Check / check (push) Has been cancelled

This commit is contained in:
WuYongJie 2025-11-22 18:16:51 +08:00
parent 90af4a20fc
commit 492b97213e
2 changed files with 2 additions and 1 deletions

View File

@ -76,7 +76,7 @@ export async function GET() {
categories.push({
fieldKey: field.key,
fieldLabel: field.label,
options: [...new Set(options)].sort(),
options: Array.from(new Set(options)).sort(),
})
}
}

View File

@ -236,6 +236,7 @@ export default function UploadModal({ onClose, onSuccess }: UploadModalProps) {
fetchScenes()
fetchPlatforms()
fetchTemplates()
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])
const fetchCategories = async () => {