Skip to content

Commit cad39d7

Browse files
authored
fix initial handler y value being -Infinity (#2403)
2 parents cded11e + b555bcf commit cad39d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Frontend/src/components/messages2/SequenceDiagram/HandlersComponent.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const handlerItems = computed(() => {
2929
const messageTypeElement = messageTypeRefs.value[index];
3030
const count = handler.outMessages.length;
3131
const height = (count === 0 ? 1 : count) * Height_Per_Out;
32-
if (nextY === 0) nextY += Handler_Gap + (Math.max(...endpointCentrePoints.value.map((cp) => cp.top)) ?? 0);
32+
if (nextY === 0) nextY += Handler_Gap + Math.max(...[0, ...endpointCentrePoints.value.map((cp) => cp.top)]);
3333
const y = nextY;
3434
nextY += height + Handler_Gap;
3535
const fill = (() => {

0 commit comments

Comments
 (0)