fix store validation code generation (#3735)

pull/3757/head
Maurício Kishi 5 years ago committed by Conduitry
parent 8d7d0ff7dd
commit 914d155d9f

@ -301,7 +301,7 @@ export default function dom(
return !variable || variable.hoistable;
})
.map(({ name }) => b`
${component.compile_options.dev && `@validate_store(${name.slice(1)}, '${name.slice(1)}');`}
${component.compile_options.dev && b`@validate_store(${name.slice(1)}, '${name.slice(1)}');`}
@component_subscribe($$self, ${name.slice(1)}, $$value => $$invalidate('${name}', ${name} = $$value));
`);

@ -1,4 +1,6 @@
export default {
compileOptions: { dev: true }, // tests `@validate_store` code generation
html: `
<p>42</p>
`

Loading…
Cancel
Save