Skip to content

Commit

Permalink
declare a flags if none
Browse files Browse the repository at this point in the history
  • Loading branch information
alicewriteswrongs committed Apr 25, 2022
1 parent ef2b8b0 commit 97ca503
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/compiler/config/validate-dev-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ export const validateDevServer = (
return undefined;
}

const flags = config.flags;
const flags = config.flags ?? {};
const devServer = { ...config.devServer };

if (flags && flags.address && isString(flags.address)) {
if (flags.address && isString(flags.address)) {
devServer.address = flags.address;
} else if (!isString(devServer.address)) {
devServer.address = '0.0.0.0';
Expand Down

0 comments on commit 97ca503

Please sign in to comment.