mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-25 01:43:27 +08:00
Feat: The PageRank value on the dataset settings page fails to display when the page is opened. (#17309)
### Summary Feat: The PageRank value on the dataset settings page fails to display when the page is opened.
This commit is contained in:
@@ -29,10 +29,17 @@ export function transformParserConfigSetups(
|
||||
}
|
||||
|
||||
return Object.entries(setups)
|
||||
.map(([fileFormat, config]) => ({
|
||||
fileFormat,
|
||||
...config,
|
||||
}))
|
||||
.map(([fileFormat, config]) => {
|
||||
const { pages, ...rest } = (config ?? {}) as Record<string, any>;
|
||||
const normalizedPages = Array.isArray(pages)
|
||||
? pages.map(([from, to]: [number, number]) => ({ from, to }))
|
||||
: pages;
|
||||
return {
|
||||
fileFormat,
|
||||
...rest,
|
||||
...(normalizedPages !== undefined ? { pages: normalizedPages } : {}),
|
||||
} as Record<string, any>;
|
||||
})
|
||||
.sort((a, b) => (a.order_index ?? Infinity) - (b.order_index ?? Infinity));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user