Browse Source

fix(email-plugin): Added filename filter for json files (#821)

Co-authored-by: Kevin Mattutat <kevin.mattutat@spaceparrots.de>
Drayke 4 years ago
parent
commit
317a63cbec
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/email-plugin/src/dev-mailbox.ts

+ 1 - 1
packages/email-plugin/src/dev-mailbox.ts

@@ -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({