Skip to content

Commit

Permalink
fix: assign doc props before getting story controls
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed May 17, 2021
1 parent 58aafc4 commit 3768ca2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/cc-cli/src/data-templates/data-template.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import dot from 'dot';
import {
mergeStoryProps,
getStoryControls,
randomizeData,
randomizeSeed,
Expand Down Expand Up @@ -46,7 +47,7 @@ export const createDataTemplate = async (
}
Object.keys(stories).forEach(storyId => {
const story = stories[storyId];

Object.assign(story, mergeStoryProps(doc, story));
const storyControls = getStoryControls(story, doc, components);
if (storyControls) {
const controls = fixControlTypes(storyControls);
Expand Down

0 comments on commit 3768ca2

Please sign in to comment.