Skip to content

Commit

Permalink
specific comments exists now fails if no specific blocks exist (#9866)
Browse files Browse the repository at this point in the history
  • Loading branch information
srietkerk authored Feb 14, 2024
1 parent be58646 commit d2e0ba5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ export function validateSpecificBlockCommentsExist({ usedBlocks, blockType }: {
} {
const allSpecifcBlocks = usedBlocks.filter((block) => block.type === blockType);
const uncommentedBlocks = allSpecifcBlocks.filter((block) => !block.getCommentText());
return { uncommentedBlocks, passed: uncommentedBlocks.length === 0 };
const passed = allSpecifcBlocks.length === 0 ? false : uncommentedBlocks.length === 0;
return { uncommentedBlocks, passed };
}

0 comments on commit d2e0ba5

Please sign in to comment.