mirror of
https://github.com/sveltejs/svelte.git
synced 2024-12-01 17:30:59 +01:00
fix #1960 typo
This commit is contained in:
parent
dcad65b118
commit
f0b6be1355
@ -379,7 +379,7 @@ function readAttribute(parser: Parser, uniqueNames: Set<string>) {
|
||||
parser.allowWhitespace();
|
||||
|
||||
const colon_index = name.indexOf(':');
|
||||
const type = colon_index !== 1 && get_directive_type(name.slice(0, colon_index));
|
||||
const type = colon_index !== -1 && get_directive_type(name.slice(0, colon_index));
|
||||
|
||||
let value: any[] | true = true;
|
||||
if (parser.eat('=')) {
|
||||
|
1
test/runtime/samples/prop-not-action/Nested.html
Normal file
1
test/runtime/samples/prop-not-action/Nested.html
Normal file
@ -0,0 +1 @@
|
||||
<h1>Hello {user.name}!</h1>
|
9
test/runtime/samples/prop-not-action/_config.js
Normal file
9
test/runtime/samples/prop-not-action/_config.js
Normal file
@ -0,0 +1,9 @@
|
||||
export default {
|
||||
props: {
|
||||
currentUser: { name: 'world' }
|
||||
},
|
||||
|
||||
html: `
|
||||
<h1>Hello world!</h1>
|
||||
`
|
||||
};
|
6
test/runtime/samples/prop-not-action/main.html
Normal file
6
test/runtime/samples/prop-not-action/main.html
Normal file
@ -0,0 +1,6 @@
|
||||
<script>
|
||||
import Nested from './Nested.html';
|
||||
export let currentUser;
|
||||
</script>
|
||||
|
||||
<Nested user={currentUser}/>
|
Loading…
Reference in New Issue
Block a user