gh-13270
Rich Harris 18 hours ago
parent 56a0d23167
commit e7639a54db

@ -95,7 +95,7 @@ export function RegularElement(node, context) {
/** @type {Map<string, AST.BindDirective>} */ /** @type {Map<string, AST.BindDirective>} */
const bindings = new Map(); const bindings = new Map();
let has_spread = false; let has_spread = node.metadata.has_spread;
let has_use = false; let has_use = false;
for (const attribute of node.attributes) { for (const attribute of node.attributes) {
@ -129,7 +129,6 @@ export function RegularElement(node, context) {
case 'SpreadAttribute': case 'SpreadAttribute':
attributes.push(attribute); attributes.push(attribute);
has_spread = true;
break; break;
case 'StyleDirective': case 'StyleDirective':
@ -195,7 +194,7 @@ export function RegularElement(node, context) {
// Then do attributes // Then do attributes
let is_attributes_reactive = false; let is_attributes_reactive = false;
if (node.metadata.has_spread) { if (has_spread) {
build_element_spread_attributes( build_element_spread_attributes(
attributes, attributes,
context, context,
@ -258,7 +257,7 @@ export function RegularElement(node, context) {
node_id, node_id,
context, context,
is_attributes_reactive, is_attributes_reactive,
lookup.has('style') || node.metadata.has_spread lookup.has('style') || has_spread
); );
// Apply the src and loading attributes for <img> elements after the element is appended to the document // Apply the src and loading attributes for <img> elements after the element is appended to the document

@ -153,8 +153,6 @@ function build_dynamic_element_attributes(element, attributes, context, element_
return false; return false;
} }
// TODO why are we always treating this as a spread? needs docs, if that's not an error
let needs_isolation = false; let needs_isolation = false;
let is_reactive = false; let is_reactive = false;

Loading…
Cancel
Save