fix member expressions for real

async-abort-signal
Rich Harris 7 months ago
parent 994afafbd9
commit bcdddc6efb

@ -176,7 +176,9 @@ export function build_component(node, component_name, context, anchor = context.
// When we have a non-simple computation, anything other than an Identifier or Member expression, // When we have a non-simple computation, anything other than an Identifier or Member expression,
// then there's a good chance it needs to be memoized to avoid over-firing when read within the // then there's a good chance it needs to be memoized to avoid over-firing when read within the
// child component (e.g. `active={i === index}`) // child component (e.g. `active={i === index}`)
const should_wrap_in_derived = get_attribute_chunks(attribute.value).some((n) => { const should_wrap_in_derived =
metadata.is_async ||
get_attribute_chunks(attribute.value).some((n) => {
return ( return (
n.type === 'ExpressionTag' && n.type === 'ExpressionTag' &&
n.expression.type !== 'Identifier' && n.expression.type !== 'Identifier' &&

Loading…
Cancel
Save