Skip to content

Commit

Permalink
66 - Fall back to empty dimension space point if no dimensions exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernhard Schmitt committed Sep 20, 2024
1 parent a1f2e50 commit 37e8b14
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions Neos.Ui/custom-node-tree/src/infrastructure/http/getTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 37e8b14

Please sign in to comment.