Skip to content

Commit

Permalink
fix: do not generate record if no data
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed May 7, 2021
1 parent 9c19117 commit f29ccb3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/cc-cli/src/data-templates/data-template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ export const createDataTemplate = async (
for (let i = Object.keys(values).length; i < numValues; i += 1) {
values[i.toString()] = randomizeData(controls);
}
data[storyId] = values;
if (Object.keys(values).length) {
data[storyId] = values;
}
}
});
if (!Object.keys(data).length) {
Expand Down

0 comments on commit f29ccb3

Please sign in to comment.