Lint Code [skip actions]

This commit is contained in:
github-actions 2023-05-31 05:35:46 +00:00
parent 6c97da3715
commit 3563d05685
2 changed files with 4 additions and 8 deletions

View File

@ -66,8 +66,7 @@ export function setTargetPlayer(player: number, token: string | null = null): vo
*/ */
export async function setServerDetails(newAddress: string | null, newPort: string | number | null): Promise<void> { export async function setServerDetails(newAddress: string | null, newPort: string | number | null): Promise<void> {
if (!getWindowDetails().disable) { if (!getWindowDetails().disable) {
if (typeof newPort == "number") if (typeof newPort == "number") newPort = newPort.toString();
newPort = newPort.toString();
// Apply the new details. // Apply the new details.
if (newAddress != null) { if (newAddress != null) {

View File

@ -174,11 +174,8 @@ export function getWindowDetails(): WindowDetails {
const { address, port, disable } = details; const { address, port, disable } = details;
return { return {
address: (address as string).includes("DETAILS_ADDRESS") address: (address as string).includes("DETAILS_ADDRESS") ? "127.0.0.1" : address,
? "127.0.0.1" : address, port: (port as string).includes("DETAILS_PORT") ? 443 : parseInt(port),
port: (port as string).includes("DETAILS_PORT") disable: (disable as string).includes("DETAILS_DISABLE") ? false : disable == "true"
? 443 : parseInt(port),
disable: (disable as string).includes("DETAILS_DISABLE")
? false : disable == "true"
}; };
} }