Skip to content

Commit

Permalink
fix(email-plugin): Added filename filter for json files (#821)
Browse files Browse the repository at this point in the history
Co-authored-by: Kevin Mattutat <[email protected]>
  • Loading branch information
Draykee and Kevin Mattutat authored Apr 13, 2021
1 parent 13a4b68 commit 317a63c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/email-plugin/src/dev-mailbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export class DevMailbox {
private async getEmailList(outputPath: string) {
const list = await fs.readdir(outputPath);
const contents: any[] = [];
for (const fileName of list) {
for (const fileName of list.filter(name => name.endsWith('.json'))) {
const json = await fs.readFile(path.join(outputPath, fileName), 'utf-8');
const content = JSON.parse(json);
contents.push({
Expand Down

0 comments on commit 317a63c

Please sign in to comment.