Skip to content

Commit b86b5d2

Browse files
committed
refactor code
1 parent 57ceabd commit b86b5d2

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/batch/batch.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ export class Batch {
4242
}
4343
}
4444
const reactElement = email.react as React.ReactElement;
45-
const html = await this.renderAsync(reactElement);
46-
email.html = html;
45+
email.html = await this.renderAsync(reactElement);
4746
if (email.text === undefined) {
4847
email.text = await this.renderAsync(reactElement, {
4948
plainText: true,

src/emails/emails.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ export class Emails {
5252
}
5353

5454
const reactElement = payload.react as React.ReactElement;
55-
const html = await this.renderAsync(reactElement);
56-
payload.html = html;
55+
payload.html = await this.renderAsync(reactElement);
5756
if (payload.text === undefined) {
5857
payload.text = await this.renderAsync(reactElement, {
5958
plainText: true,

0 commit comments

Comments
 (0)