Skip to content

Commit beaa64f

Browse files
committed
revert some stuff for now
1 parent b386784 commit beaa64f

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

packages/svelte/src/compiler/phases/3-transform/client/visitors/RegularElement.js

-3
Original file line numberDiff line numberDiff line change
@@ -648,9 +648,6 @@ function build_custom_element_attribute_update_assignment(node_id, attribute, co
648648
state.init.push(b.stmt(b.call('$.template_effect', b.thunk(update.expression))));
649649
return true;
650650
} else {
651-
if (attribute.metadata.expression.is_async) {
652-
throw new Error('TODO top-level await');
653-
}
654651
state.init.push(update);
655652
return false;
656653
}

packages/svelte/src/compiler/phases/3-transform/client/visitors/shared/component.js

+2-11
Original file line numberDiff line numberDiff line change
@@ -172,17 +172,8 @@ export function build_component(node, component_name, context, anchor = context.
172172
if (should_wrap_in_derived) {
173173
const id = b.id(context.state.scope.generate(attribute.name));
174174

175-
if (attribute.metadata.expression.is_async) {
176-
context.state.metadata.async.push({
177-
id,
178-
expression: arg
179-
});
180-
181-
arg = b.call(id);
182-
} else {
183-
context.state.init.push(b.var(id, create_derived(context.state, b.thunk(value))));
184-
arg = b.call('$.get', id);
185-
}
175+
context.state.init.push(b.var(id, create_derived(context.state, b.thunk(value))));
176+
arg = b.call('$.get', id);
186177
}
187178

188179
push_prop(b.get(attribute.name, [b.return(arg)]));

0 commit comments

Comments
 (0)