From 34cf502a275e512fdb3336ec6ff33e0f1150a88b Mon Sep 17 00:00:00 2001 From: Matteo V Date: Thu, 30 May 2024 09:40:55 +0200 Subject: [PATCH] Fix #10368 fix positioning of groups generated from GPT tool (#10370) (#10379) --- web/client/reducers/layers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/client/reducers/layers.js b/web/client/reducers/layers.js index ae40348286..e841ba7d13 100644 --- a/web/client/reducers/layers.js +++ b/web/client/reducers/layers.js @@ -60,7 +60,7 @@ const insertNode = (nodes, node, parent, asFirst = false) => { } return nodes.map(n => isString(n) ? n : (n.id === parent ? { ...n, - nodes: [...n.nodes, node] + nodes: asFirst ? [node, ...n.nodes] : [...n.nodes, node] } : { ...n, nodes: insertNode(n.nodes, node, parent, asFirst)