Skip to content

Commit 89acdf5

Browse files
committed
Fixes #496
1 parent d7eaa4c commit 89acdf5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/features/modals/NodeModal/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ const normalizeNodeData = (nodeRows: NodeData["text"]) => {
2222
// return json path in the format $["customer"]
2323
const jsonPathToString = (path?: NodeData["path"]) => {
2424
if (!path || path.length === 0) return "$";
25-
return `$["${path.join('"]["')}"]`;
25+
const segments = path.map(seg => (typeof seg === "number" ? seg : `"${seg}"`));
26+
return `$[${segments.join("][")}]`;
2627
};
2728

2829
export const NodeModal = ({ opened, onClose }: ModalProps) => {

0 commit comments

Comments
 (0)