Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store: always call composeConfigs in setProjectAnnotations #18916

Merged
merged 1 commit into from Aug 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions code/lib/store/src/csf/testing-utils/index.ts
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