Skip to content

Commit 78c4b04

Browse files
committed
Fixed an issue that it throws error when async message is empty.
1 parent 8021f80 commit 78c4b04

File tree

1 file changed

+4
-5
lines changed
  • src/components/DiagramFrame/SeqDiagram/MessageLayer/Block/Statement/InteractionAsync/SelfInvocationAsync

1 file changed

+4
-5
lines changed

src/components/DiagramFrame/SeqDiagram/MessageLayer/Block/Statement/InteractionAsync/SelfInvocationAsync/SelfInvocation-async.vue

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,14 @@ const props = defineProps<{
4545
}>();
4646
const { context } = toRefs(props);
4747
const store = useStore();
48-
48+
const content = computed(() => context?.value.content());
4949
const numbering = computed(() => store.state.numbering);
5050
const labelPosition: ComputedRef<[number, number]> = computed(() => {
51-
if (!context?.value) return [-1, -1];
52-
const content = context?.value.content();
53-
return [content.start.start, content.stop.stop];
51+
if (!content.value) return [-1, -1];
52+
return [content.value.start.start, content.value.stop.stop];
5453
});
5554
const labelText = computed(() => {
56-
return context?.value.content().getFormattedText();
55+
return content.value?.getFormattedText();
5756
});
5857
</script>
5958

0 commit comments

Comments
 (0)