This commit is contained in:
Nikolay Rozhkov
2023-06-27 16:22:12 +03:00
parent 0bbf0555d3
commit f0231ad9b1

View File

@@ -81,7 +81,7 @@ export const draw = function (text: string, id: string, _version: string, diagOb
[SankeyNodeAlignment.right, d3SankeyRight],
[SankeyNodeAlignment.center, d3SankeyCenter],
[SankeyNodeAlignment.justify, d3SankeyJustify],
])
]);
// We need fallback because typescript thinks that `get` can result in undefined
const nodeAlign = alignmentsMap.get(nodeAlignment) || d3SankeyJustify;