Skip to content

Commit 6859f4c

Browse files
authored
Merge pull request #2363 from modernweb-dev/fix/flatten-mocks
fix: flatten mocks correctly
2 parents 7ab5f6b + c2a9df2 commit 6859f4c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/young-beans-grab.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@web/mocks": patch
3+
---
4+
5+
fix: flatten mocks correctly

packages/mocks/storybook/decorator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const withMocks = makeDecorator({
5656
});
5757

5858
if (finalizedMocks) {
59-
addons.getChannel().emit('mocks:loaded', finalizedMocks);
59+
addons.getChannel().emit('mocks:loaded', finalizedMocks.flat(Infinity));
6060
registerMockRoutes(finalizedMocks);
6161
}
6262

0 commit comments

Comments
 (0)