0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-12-01 17:30:59 +01:00

fix store validation code generation (#3735)

This commit is contained in:
Maurício Kishi 2019-10-19 16:20:46 -03:00 committed by Conduitry
parent 8d7d0ff7dd
commit 914d155d9f
2 changed files with 3 additions and 1 deletions

View File

@ -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));
`);

View File

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