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:
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…
Reference in New Issue
Block a user