Skip to content

Commit

Permalink
fix: do not generate data if no controls
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed May 7, 2021
1 parent 7a24899 commit 9c19117
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/cc-cli/src/data-templates/data-template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ export const createDataTemplate = async (
data[storyId] = values;
}
});
if (!Object.keys(data).length) {
return undefined;
}
return {
content: prettify(
dot.template(getTemplate(`data-templates/data`, format))({
Expand Down

0 comments on commit 9c19117

Please sign in to comment.