From 4f3588ab55c9eb700625fb31a437bda7533fe9d5 Mon Sep 17 00:00:00 2001 From: Martin Almvik Date: Tue, 16 Apr 2024 10:40:09 +0200 Subject: [PATCH] fix(mock/msw): override response if it's false as well --- packages/mock/src/msw/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mock/src/msw/index.ts b/packages/mock/src/msw/index.ts index 4f998f6e6..b2e5cc6bc 100644 --- a/packages/mock/src/msw/index.ts +++ b/packages/mock/src/msw/index.ts @@ -102,7 +102,7 @@ export const ${handlerName} = (${isReturnHttpResponse && !isTextPlain ? `overrid isReturnHttpResponse ? isTextPlain ? `${getResponseMockFunctionName}()` - : `JSON.stringify(overrideResponse ? overrideResponse : ${getResponseMockFunctionName}())` + : `JSON.stringify(overrideResponse !== undefined ? overrideResponse : ${getResponseMockFunctionName}())` : null }, {