Skip to content

Commit

Permalink
Fixed the issue where printStartupLog and noHandlerResponse404 were s…
Browse files Browse the repository at this point in the history
…et to false and did not work
  • Loading branch information
octoape committed Aug 22, 2024
1 parent 2abb03d commit a50005d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ export default (options?: MockOptions): Plugin => {
options.mockRootDir = options.mockRootDir || './mock'
options.mockJsSuffix = options.mockJsSuffix || '.mock.js'
options.mockTsSuffix = options.mockTsSuffix || '.mock.ts'
options.noHandlerResponse404 = options.noHandlerResponse404 || true
options.printStartupLog = options.printStartupLog || true
console.log(typeof options.printStartupLog)
options.noHandlerResponse404 = (typeof options.noHandlerResponse404 !== 'boolean') ? true : options.noHandlerResponse404
options.printStartupLog = (typeof options.printStartupLog !== 'boolean') ? true : options.printStartupLog
if (options.mockModules && options.mockModules.length > 0) {
console.warn('[' + PLUGIN_NAME + '] mock modules will be set automatically, and the configuration will be ignored', options.mockModules)
}
Expand Down

0 comments on commit a50005d

Please sign in to comment.