aaa
Dominic Gannaway 8 months ago
parent 48cf4a25f6
commit 0d34b7abb6

@ -15,7 +15,11 @@ export function AwaitExpression(node, context) {
}
const inside_derived = context.path.some(
(n) => n.type === 'CallExpression' && get_rune(n, context.state.scope) === '$derived'
(n) =>
n.type === 'VariableDeclaration' &&
n.declarations.some(
(d) => d.init?.type === 'CallExpression' && get_rune(d.init, context.state.scope) === '$derived'
)
);
const expression = b.call(

@ -281,6 +281,8 @@ export function capture() {
// prevent the active effect from outstaying its welcome
if (should_exit) {
queue_post_micro_task(exit);
} else {
debugger
}
};
}
@ -317,6 +319,7 @@ export async function script_suspend(fn) {
const restore = capture();
const unsuspend = suspend();
try {
exit();
return await fn();
} finally {
restore(false);

Loading…
Cancel
Save