pull/3822/head
Conduitry 6 years ago
parent 63a56ad8a2
commit 7e5578f2ea

@ -167,18 +167,14 @@ export default function dom(
`;
}
const capturable_vars = component.vars.filter(
v => !v.internal && v.name != null && !(v.name[0] === '$' && v.name[1] === '$')
);
const injectable_vars = capturable_vars.filter(
v => !v.module && v.writable && v.name[0] !== '$'
);
const capturable_vars = component.vars.filter(v => !v.internal && !v.name.startsWith('$$'));
capture_state = capturable_vars.length > 0
? x`() => ({ ${capturable_vars.map(prop => p`${prop.name}`)} })`
: x`@noop`;
const injectable_vars = capturable_vars.filter(v => !v.module && v.writable && v.name[0] !== '$');
if (uses_props || injectable_vars.length > 0) {
inject_state = x`
${$$props} => {

Loading…
Cancel
Save