Skip to content

Commit

Permalink
feat: minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgeorge007 committed Jul 16, 2019
1 parent d3da508 commit be5beaa
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/Server.js
Expand Up @@ -292,14 +292,12 @@ class Server {
* ]
*/
this.options.proxy.forEach((proxyConfigOrCallback) => {
let proxyConfig;
let proxyMiddleware;

if (typeof proxyConfigOrCallback === 'function') {
proxyConfig = proxyConfigOrCallback();
} else {
proxyConfig = proxyConfigOrCallback;
}
let proxyConfig =
typeof proxyConfigOrCallback === 'function'
? proxyConfigOrCallback()
: proxyConfigOrCallback;

proxyMiddleware = getProxyMiddleware(proxyConfig);

Expand Down

0 comments on commit be5beaa

Please sign in to comment.