Add attribute quotes to generated App.svelte

This commit is contained in:
mrkishi
2019-05-08 22:38:31 -03:00
parent 8bdd363a19
commit fe6b7976ef

View File

@@ -251,11 +251,11 @@ function generate_app(manifest_data: ManifestData, path_to_routes: string) {
let l = max_depth;
let pyramid = `<svelte:component this={level${l}.component} {...level${l}.props}/>`;
let pyramid = `<svelte:component this="{level${l}.component}" {...level${l}.props}/>`;
while (l-- > 1) {
pyramid = `
<svelte:component this={level${l}.component} segment={segments[${l}]} {...level${l}.props}>
<svelte:component this="{level${l}.component}" segment="{segments[${l}]}" {...level${l}.props}>
{#if level${l + 1}}
${pyramid.replace(/\n/g, '\n\t\t\t\t\t')}
{/if}
@@ -281,7 +281,7 @@ function generate_app(manifest_data: ManifestData, path_to_routes: string) {
setContext(CONTEXT_KEY, stores);
</script>
<Layout segment={segments[0]} {...level0.props}>
<Layout segment="{segments[0]}" {...level0.props}>
{#if error}
<Error {error} {status}/>
{:else}