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.
2 parents 76d04dc + bfa0bc9 commit 21e3db1Copy full SHA for 21e3db1
src/compiler/compile/nodes/shared/Expression.ts
@@ -363,7 +363,7 @@ export default class Expression {
363
}
364
365
const fn = deindent`
366
- function ${name}(${args.join(', ')}) ${body}
+ ${node.async && 'async '}function${node.generator && '*'} ${name}(${args.join(', ')}) ${body}
367
`;
368
369
if (dependencies.size === 0 && contextual_dependencies.size === 0) {
test/runtime/samples/event-handler-async/_config.js
@@ -0,0 +1,5 @@
1
+export default {
2
+ html: `
3
+ <button>nothing</button>
4
+ `,
5
+};
test/runtime/samples/event-handler-async/main.svelte
@@ -0,0 +1 @@
+<button on:click={async () => { await null; }}>nothing</button>
0 commit comments