Skip to content

Commit

Permalink
Merge pull request #18916 from storybookjs/fix/set-project-annotations
Browse files Browse the repository at this point in the history
Store: always call composeConfigs in setProjectAnnotations
  • Loading branch information
yannbf authored Aug 11, 2022
2 parents 1d80c8e + 1052e44 commit 30df6a2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions code/lib/store/src/csf/testing-utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ let GLOBAL_STORYBOOK_PROJECT_ANNOTATIONS = {};
export function setProjectAnnotations<TFramework extends AnyFramework = AnyFramework>(
projectAnnotations: ProjectAnnotations<TFramework> | ProjectAnnotations<TFramework>[]
) {
GLOBAL_STORYBOOK_PROJECT_ANNOTATIONS = Array.isArray(projectAnnotations)
? composeConfigs(projectAnnotations)
: projectAnnotations;
const annotations = Array.isArray(projectAnnotations) ? projectAnnotations : [projectAnnotations];
GLOBAL_STORYBOOK_PROJECT_ANNOTATIONS = composeConfigs(annotations);
}

interface ComposeStory<TFramework extends AnyFramework = AnyFramework, TArgs extends Args = Args> {
Expand Down

0 comments on commit 30df6a2

Please sign in to comment.