From 11d445024418cb4a50f02ace11a2a9ca3c65ee0b Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Thu, 13 Jan 2022 11:25:50 +0100 Subject: [PATCH] fix condition to show comment in on-the-fly --- .../public/vuejs/OnTheFly/components/OnTheFly.vue | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue index edeb321cf..d4342fdee 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue @@ -103,13 +103,11 @@ export default { computed: { hasResourceComment() { //console.log('hasResourceComment', this.parent); - if (typeof this.parent === 'undefined' || this.parent === null) { - return false; - } - return this.action === 'show' + return (typeof this.parent !== 'undefined' && this.parent !== null) + && this.action === 'show' && this.parent.type === 'accompanying_period_resource' - && (this.parent.comment !== null || this.parent.comment !== '') - ; + && (this.parent.comment !== null && this.parent.comment !== '') + ; }, classAction() { switch (this.action) {