Showing
1 changed file
with
4 additions
and
4 deletions
| @@ -31,11 +31,11 @@ export struct Card6Component { | @@ -31,11 +31,11 @@ export struct Card6Component { | ||
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | titleInit() { | 33 | titleInit() { |
| 34 | - if (this.contentDTO.title.includes('<em>') && this.contentDTO.title.includes('</em>')) { | 34 | + if (this.contentDTO.title?.includes('<em>') && this.contentDTO.title?.includes('</em>')) { |
| 35 | this.titleMarked = true; | 35 | this.titleMarked = true; |
| 36 | - this.str01 = this.contentDTO.newsTitle?.split('<em>')[0] || ''; | ||
| 37 | - this.str02 = this.contentDTO.newsTitle?.split('<em>')[1].split('</em>')[0] || ''; | ||
| 38 | - this.str03 = this.contentDTO.newsTitle?.split('<em>')[1].split('</em>')[1] || ''; | 36 | + this.str01 = this.contentDTO.title?.split('<em>')[0] || ''; |
| 37 | + this.str02 = this.contentDTO.title?.split('<em>')[1].split('</em>')[0] || ''; | ||
| 38 | + this.str03 = this.contentDTO.title?.split('<em>')[1].split('</em>')[1] || ''; | ||
| 39 | } | 39 | } |
| 40 | } | 40 | } |
| 41 | 41 |
-
Please register or login to post a comment