fix: assertion is unnecessary
This commit is contained in:
1 parent
f9cb2c18df
commit
f35e70f2fb
1 file changed
+1
-1
@@ -121,7 +121,7 @@ export class WebUiConfigWrapper {
|
|||||||
} else {
|
} else {
|
||||||
parsedConfig.host = host;
|
parsedConfig.host = host;
|
||||||
// 修正端口占用情况
|
// 修正端口占用情况
|
||||||
const [port_err, port] = await tryUsePort(parsedConfig.port, parsedConfig.host).then(data => [null, data as number]).catch(err => [err, null]);
|
const [port_err, port] = await tryUsePort(parsedConfig.port, parsedConfig.host).then(data => [null, data]).catch(err => [err, null]);
|
||||||
if (port_err) {
|
if (port_err) {
|
||||||
console.log('port不可用', port_err);
|
console.log('port不可用', port_err);
|
||||||
parsedConfig.port = 0; // 设置为0,禁用WebUI
|
parsedConfig.port = 0; // 设置为0,禁用WebUI
|
||||||
|
|||||||
Reference in new issue
Block a user