diff --git a/packages/frontend/.storybook/generate.tsx b/packages/frontend/.storybook/generate.tsx index 327ed4bc7..0a4ec3910 100644 --- a/packages/frontend/.storybook/generate.tsx +++ b/packages/frontend/.storybook/generate.tsx @@ -16,7 +16,13 @@ interface SatisfiesExpression extends estree.BaseExpression { const generator = { ...GENERATOR, SatisfiesExpression(node: SatisfiesExpression, state: State) { - this[node.expression.type](node.expression, state); + if (node.expression.type === 'ArrowFunctionExpression') { + state.write('('); + this[node.expression.type](node.expression, state); + state.write(')'); + } else { + this[node.expression.type](node.expression, state); + } state.write(' satisfies '); this[node.reference.type](node.reference, state); }, diff --git a/packages/frontend/.storybook/preview.ts b/packages/frontend/.storybook/preview.ts index a39b59fa7..72e642189 100644 --- a/packages/frontend/.storybook/preview.ts +++ b/packages/frontend/.storybook/preview.ts @@ -64,7 +64,7 @@ const preview = { const story = Story(); if (!initialized) { const channel = addons.getChannel(); - requestIdleCallback(() => { + (globalThis.requestIdleCallback || setTimeout)(() => { channel.emit(FORCE_REMOUNT, { storyId: context.id }); }); }