revert some stuff for now

aaa
Rich Harris 8 months ago
parent b386784d97
commit beaa64f0de

@ -648,9 +648,6 @@ function build_custom_element_attribute_update_assignment(node_id, attribute, co
state.init.push(b.stmt(b.call('$.template_effect', b.thunk(update.expression))));
return true;
} else {
if (attribute.metadata.expression.is_async) {
throw new Error('TODO top-level await');
}
state.init.push(update);
return false;
}

@ -172,18 +172,9 @@ export function build_component(node, component_name, context, anchor = context.
if (should_wrap_in_derived) {
const id = b.id(context.state.scope.generate(attribute.name));
if (attribute.metadata.expression.is_async) {
context.state.metadata.async.push({
id,
expression: arg
});
arg = b.call(id);
} else {
context.state.init.push(b.var(id, create_derived(context.state, b.thunk(value))));
arg = b.call('$.get', id);
}
}
push_prop(b.get(attribute.name, [b.return(arg)]));
} else {

Loading…
Cancel
Save