We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9aa5e28 commit 3305123Copy full SHA for 3305123
content/tutorial/01-svelte/07-lifecycle/02-update/app-a/src/lib/App.svelte
@@ -27,8 +27,6 @@
27
28
async function handleKeydown(event) {
29
if (event.key === 'Enter' && event.target.value) {
30
- event.target.value = '';
31
-
32
const comment = {
33
author: 'user',
34
text: event.target.value
@@ -39,6 +37,7 @@
39
37
text: eliza.transform(comment.text)
40
38
};
41
+ event.target.value = '';
42
comments = [...comments, comment];
43
44
await pause(200 * (1 + Math.random()));
0 commit comments