fix condition to show comment in on-the-fly

This commit is contained in:
Mathieu Jaumotte 2022-01-13 11:25:50 +01:00
parent e6ea2674c2
commit 11d4450244

View File

@ -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) {