From 37e8b145fe9d6c9e9efe90c4143fe2d895dc5eab Mon Sep 17 00:00:00 2001 From: Bernhard Schmitt Date: Fri, 20 Sep 2024 09:22:45 +0200 Subject: [PATCH] 66 - Fall back to empty dimension space point if no dimensions exist --- .../src/infrastructure/http/getTree.ts | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/Neos.Ui/custom-node-tree/src/infrastructure/http/getTree.ts b/Neos.Ui/custom-node-tree/src/infrastructure/http/getTree.ts index 15be146..f761a56 100644 --- a/Neos.Ui/custom-node-tree/src/infrastructure/http/getTree.ts +++ b/Neos.Ui/custom-node-tree/src/infrastructure/http/getTree.ts @@ -41,14 +41,21 @@ export async function getTree( const searchParams = new URLSearchParams(); searchParams.set("workspaceName", query.workspaceName); - for (const [dimensionName, fallbackChain] of Object.entries( - query.dimensionValues - )) { - for (const fallbackValue of fallbackChain) { - searchParams.set( - `dimensionValues[${dimensionName}][]`, - fallbackValue - ); + if (Object.keys(query.dimensionValues).length === 0) { + searchParams.set( + `dimensionValues`, + `[]` + ); + } else { + for (const [dimensionName, fallbackChain] of Object.entries( + query.dimensionValues + )) { + for (const fallbackValue of fallbackChain) { + searchParams.set( + `dimensionValues[${dimensionName}][]`, + fallbackValue + ); + } } } searchParams.set("startingPoint", query.startingPoint);