From 890a414a47f2f50271fcc4d4bea493b5102f00b0 Mon Sep 17 00:00:00 2001 From: balibabu Date: Fri, 24 Jul 2026 15:27:24 +0800 Subject: [PATCH] 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. --- web/src/utils/pipeline-operator.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/web/src/utils/pipeline-operator.ts b/web/src/utils/pipeline-operator.ts index ceabc7d5a5..64abcee560 100644 --- a/web/src/utils/pipeline-operator.ts +++ b/web/src/utils/pipeline-operator.ts @@ -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; + const normalizedPages = Array.isArray(pages) + ? pages.map(([from, to]: [number, number]) => ({ from, to })) + : pages; + return { + fileFormat, + ...rest, + ...(normalizedPages !== undefined ? { pages: normalizedPages } : {}), + } as Record; + }) .sort((a, b) => (a.order_index ?? Infinity) - (b.order_index ?? Infinity)); }