From 90c5b0341afb8036e8f4ee794e5a8b0e099bf2e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 24 Sep 2024 14:36:01 +0200 Subject: [PATCH] Handle null transitionPreviousBy in ListWorkflow.vue Previously, the getPopContent method assumed transitionPreviousBy would always have a value, which led to errors when it was null. This update adds a conditional check to handle cases where transitionPreviousBy is null, ensuring the component renders correctly. --- .../_components/EntityWorkflow/ListWorkflow.vue | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/ListWorkflow.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/ListWorkflow.vue index de645f899..943ea85f3 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/ListWorkflow.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/ListWorkflow.vue @@ -102,11 +102,17 @@ export default { }, getPopContent(step) { if (step.transitionPrevious != null) { - return `` - ; + if (step.transitionPreviousBy !== null) { + return `` + ; + } else { + return `` + } } }, formatDate(datetime) {