Skip to content

Commit 97ce0f0

Browse files
committed
fix: do not allow empty string for port
1 parent 4feeb8f commit 97ce0f0

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/options.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,8 @@
523523
"type": "number"
524524
},
525525
{
526-
"type": "string"
526+
"type": "string",
527+
"minLength": 1
527528
},
528529
{
529530
"enum": ["auto"]

test/validate-options.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,8 @@ const tests = {
258258
failure: ['', [], { foo: 'bar' }, { target: 90 }, { app: true }],
259259
},
260260
port: {
261-
success: ['', 0, 'auto'],
262-
failure: [false, null],
261+
success: ['8080', 8080, 'auto'],
262+
failure: [false, null, ''],
263263
},
264264
proxy: {
265265
success: [

0 commit comments

Comments
 (0)