From 301a6d2024816bf40f1091ccffe6bb81cb7ba7b0 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Thu, 24 Mar 2022 09:09:17 +0100 Subject: fix: fake is unable to return empty strings (#347) --- src/fake.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/fake.ts b/src/fake.ts index 726bf896..4261ebeb 100644 --- a/src/fake.ts +++ b/src/fake.ts @@ -116,6 +116,10 @@ export class Fake { // replace the found tag with the returned fake value res = str.replace('{{' + token + '}}', result); + if (res === '') { + return ''; + } + // return the response recursively until we are done finding all tags return this.fake(res); } -- cgit v1.2.3