mirror of https://github.com/sveltejs/svelte
don't warn when using each index in key (#3274)
parent
981f30d3e9
commit
c04def9081
@ -1,6 +1,6 @@
|
||||
<script>
|
||||
// script block prevents auto-declaration
|
||||
</script>
|
||||
|
||||
<p>{potato}</p>
|
||||
<p>{Math.max(1, 2)}</p>
|
||||
<p>{Math.max(1, 2)}</p>
|
||||
|
||||
{#each window.something as foo, i (foo.x + i)}
|
||||
hello
|
||||
{/each}
|
||||
|
@ -1,15 +1,15 @@
|
||||
[{
|
||||
"code": "missing-declaration",
|
||||
"message": "'potato' is not defined",
|
||||
"pos": 67,
|
||||
"message": "'potato' is not defined. Consider adding a <script> block with 'export let potato' to declare a prop",
|
||||
"pos": 4,
|
||||
"start": {
|
||||
"line": 5,
|
||||
"line": 1,
|
||||
"column": 4,
|
||||
"character": 67
|
||||
"character": 4
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"line": 1,
|
||||
"column": 10,
|
||||
"character": 73
|
||||
"character": 10
|
||||
}
|
||||
}]
|
Loading…
Reference in new issue