Merge pull request #3740 from alfonso-salces/MOBILE-4385

MOBILE-4385 side-blocks: Avoid render empty html blocks
main
Pau Ferrer Ocaña 2023-07-17 12:50:50 +02:00 committed by GitHub
commit 8ae30abadf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -93,6 +93,13 @@ export class CoreBlockSideBlocksComponent implements OnInit {
this.blocks = [];
}
this.blocks = this.blocks.filter(block =>
block.name !== 'html' ||
(
block.name === 'html' &&
!!block.contents?.content.trim().replace(/(\r\n|\n|\r)/, '').length
));
}
/**