|
|
@ -242,13 +242,11 @@ export function BindDirective(node, context) {
|
|
|
|
if (node.name === 'this') {
|
|
|
|
if (node.name === 'this') {
|
|
|
|
context.state.init.push(b.stmt(call));
|
|
|
|
context.state.init.push(b.stmt(call));
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
const has_action_directive =
|
|
|
|
const has_use =
|
|
|
|
parent.type === 'RegularElement' && parent.attributes.find((a) => a.type === 'UseDirective');
|
|
|
|
parent.type === 'RegularElement' && parent.attributes.find((a) => a.type === 'UseDirective');
|
|
|
|
|
|
|
|
|
|
|
|
if (has_action_directive) {
|
|
|
|
if (has_use) {
|
|
|
|
context.state.init.push(
|
|
|
|
context.state.init.push(b.stmt(b.call('$.effect', b.thunk(call))));
|
|
|
|
b.stmt(has_action_directive ? b.call('$.effect', b.thunk(call)) : call)
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
context.state.after_update.push(b.stmt(call));
|
|
|
|
context.state.after_update.push(b.stmt(call));
|
|
|
|
}
|
|
|
|
}
|
|
|
|