Skip to content

Commit

Permalink
fix(mock/msw): override response if it's false as well (#1313)
Browse files Browse the repository at this point in the history
  • Loading branch information
almyy authored Apr 16, 2024
1 parent b1d66dc commit b13df01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/mock/src/msw/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
{
Expand Down

0 comments on commit b13df01

Please sign in to comment.