Skip to content
Snippets Groups Projects
Unverified Commit bf527cd6 authored by Acid Chicken (硫酸鶏)'s avatar Acid Chicken (硫酸鶏)
Browse files

refactor(#10336): semantics

parent 0ac4d744
No related branches found
No related tags found
No related merge requests found
......@@ -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);
},
......
......@@ -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 });
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment