Skip to content

Commit

Permalink
Merge pull request #3740 from alfonso-salces/MOBILE-4385
Browse files Browse the repository at this point in the history
MOBILE-4385 side-blocks: Avoid render empty html blocks
  • Loading branch information
crazyserver authored Jul 17, 2023
2 parents c671428 + d110756 commit 8ae30ab
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/core/features/block/components/side-blocks/side-blocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
));
}

/**
Expand Down

0 comments on commit 8ae30ab

Please sign in to comment.