Skip to content

Commit

Permalink
fix: hideEmptyTabs should look for generic block value refs#282065
Browse files Browse the repository at this point in the history
  • Loading branch information
nileshgulia1 committed Jan 7, 2025
1 parent 451d694 commit 7ae6227
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
applySchemaDefaults,
getBlocksFieldname,
getBlocksLayoutFieldname,
blockHasValue,
} from '@plone/volto/helpers';
import { visitBlocks, toSlug } from '@eeacms/volto-anchors/helpers';

Expand Down Expand Up @@ -86,7 +87,7 @@ export const isTabEmpty = (content) => {
if (blocksNo === 1) {
const blockId = content[blocks_layout_field].items[0];
const block = blocks[blockId];
if (block['@type'] === 'slate' && !block['plaintext']) {
if (!blockHasValue(block)) {
return true;
}
}
Expand Down

0 comments on commit 7ae6227

Please sign in to comment.