Skip to content

Commit b13df01

Browse files
authoredApr 16, 2024
fix(mock/msw): override response if it's false as well (#1313)
1 parent b1d66dc commit b13df01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎packages/mock/src/msw/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export const ${handlerName} = (${isReturnHttpResponse && !isTextPlain ? `overrid
102102
isReturnHttpResponse
103103
? isTextPlain
104104
? `${getResponseMockFunctionName}()`
105-
: `JSON.stringify(overrideResponse ? overrideResponse : ${getResponseMockFunctionName}())`
105+
: `JSON.stringify(overrideResponse !== undefined ? overrideResponse : ${getResponseMockFunctionName}())`
106106
: null
107107
},
108108
{

0 commit comments

Comments
 (0)
Please sign in to comment.