Skip to content

wrong result when an existing list is updated #62

@seriousManual

Description

@seriousManual

svelte-cli version 1.0.2

consider the following template:

{{#each samples as sample}}
    {{sample}}<br>
{{/each}}

compiled via the svelte-cli and invoked with the following code

<!doctype html>
<html>
<head>
    <title>My first Svelte app</title>
</head>
<body>
<main></main>
<script src='helloWorld.js'></script>
<script>
    var app = new helloWorld({
        target: document.querySelector( 'main' ),
        data: {
            samples: ['foo', 'bar', 'bax', 'baz']
        }
    });

    app.set({samples: ['foo', 'baz']});
</script>
</body>
</html>

expected result:

foo
baz

actual result:

foo
baz
baxbaz

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions