From 1052e44bb2bd6ae726d0f73a6ee30693db290e90 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Thu, 11 Aug 2022 08:58:03 +0200 Subject: [PATCH] Store: always call composeConfigs in ssetProjectAnnotations --- code/lib/store/src/csf/testing-utils/index.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/lib/store/src/csf/testing-utils/index.ts b/code/lib/store/src/csf/testing-utils/index.ts index 6fddcbce6f5e..253a6d9820e7 100644 --- a/code/lib/store/src/csf/testing-utils/index.ts +++ b/code/lib/store/src/csf/testing-utils/index.ts @@ -27,9 +27,8 @@ let GLOBAL_STORYBOOK_PROJECT_ANNOTATIONS = {}; export function setProjectAnnotations( projectAnnotations: ProjectAnnotations | ProjectAnnotations[] ) { - 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 {