From 25a5e39473aed667742c01f95f708941febebcd5 Mon Sep 17 00:00:00 2001 From: Shodai Suzuki Date: Thu, 25 Apr 2024 09:46:51 +0900 Subject: [PATCH] fix(MSW): fixed so that `Function` can be accepted with `mock` option (#1328) --- packages/orval/src/utils/options.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/orval/src/utils/options.ts b/packages/orval/src/utils/options.ts index 81e5f5287..0b6a40e6d 100644 --- a/packages/orval/src/utils/options.ts +++ b/packages/orval/src/utils/options.ts @@ -93,6 +93,7 @@ export const normalizeOptions = async ( let mock = outputOptions.mock ?? globalOptions.mock; if (typeof mock === 'boolean' && mock) { mock = DEFAULT_MOCK_OPTIONS; + } else if (isFunction(mock)) { } else if (!mock) { mock = undefined; } else {