Skip to content

Commit

Permalink
refactor(#10336): semantics
Browse files Browse the repository at this point in the history
  • Loading branch information
acid-chicken committed Mar 21, 2023
1 parent 0ac4d74 commit bf527cd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion packages/frontend/.storybook/generate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
},
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/.storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
});
}
Expand Down

0 comments on commit bf527cd

Please sign in to comment.