Skip to content

Commit

Permalink
fix: skip undefined proxy entry (#9622)
Browse files Browse the repository at this point in the history
Co-authored-by: sapphi-red <green@sapphi.red>
  • Loading branch information
lbiceman and sapphi-red committed Aug 16, 2022
1 parent 9aa9515 commit e396d67
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/vite/src/node/server/middlewares/proxy.ts
Expand Up @@ -39,6 +39,9 @@ export function proxyMiddleware(

Object.keys(options).forEach((context) => {
let opts = options[context]
if (!opts) {
return
}
if (typeof opts === 'string') {
opts = { target: opts, changeOrigin: true } as ProxyOptions
}
Expand Down

0 comments on commit e396d67

Please sign in to comment.