Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
黄南光
/
wiki_knowledge
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 29131ca9
authored
Jul 15, 2026
by
黄南光
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改前端运行错误
1 parent
341502d2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
frontend/src/app/page.tsx
frontend/src/app/page.tsx
View file @
29131ca
...
...
@@ -218,7 +218,10 @@ export default function EnterpriseWiki() {
if (Array.isArray(responseFormats)) {
setFormatOptions(responseFormats.filter((format): format is string => typeof format === "string" && format.length > 0));
} else {
setFormatOptions(Array.from(new Set((data.files || []).map((file: FileItem) => file.format).filter(Boolean))).sort());
const fallbackFormats = ((data.files || []) as FileItem[])
.map((file) => file.format)
.filter((format) => format.length > 0);
setFormatOptions(Array.from(new Set<string>(fallbackFormats)).sort());
}
} catch (e) {
console.error("Failed to fetch files", e);
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment