Skip to content

Commit 76a2fe4

Browse files
authored
Fixed code examples (#1)
`render` return promise, so await it.
1 parent becd639 commit 76a2fe4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/1.getting-started/3.usage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ You can use the `pretty` option to beatify the output.
4040
import { MyTemplate } from './email';
4141
import { render } from '@vue-email/render';
4242

43-
const html = render(MyTemplate,{
43+
const html = await render(MyTemplate,{
4444
title: 'some title',
4545
},{
4646
pretty: true,
@@ -73,7 +73,7 @@ Here’s how to convert a Vue component into plain text.
7373
import { MyTemplate } from './email';
7474
import { render } from '@vue-email/render';
7575

76-
const text = render(MyTemplate, {
76+
const text = await render(MyTemplate, {
7777
title: 'some title',
7878
}, {
7979
plainText: true,

0 commit comments

Comments
 (0)