mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Use named constants
This commit is contained in:
@@ -289,12 +289,12 @@ if (dnsPreferIPv6) {
|
|||||||
const ipOptions = [true, 'auto', false];
|
const ipOptions = [true, 'auto', false];
|
||||||
|
|
||||||
if (!ipOptions.includes(enableIPv6)) {
|
if (!ipOptions.includes(enableIPv6)) {
|
||||||
console.warn(color.red('`protocol: ipv6` option invalid'), '\n use:', ipOptions, '\n setting to: auto');
|
console.warn(color.red('`protocol: ipv6` option invalid'), '\n use:', ipOptions, '\n setting to:', DEFAULT_ENABLE_IPV6);
|
||||||
enableIPv6 = 'auto';
|
enableIPv6 = DEFAULT_ENABLE_IPV6;
|
||||||
}
|
}
|
||||||
if (!ipOptions.includes(enableIPv4)) {
|
if (!ipOptions.includes(enableIPv4)) {
|
||||||
console.warn(color.red('`protocol: ipv4` option invalid'), '\n use:', ipOptions, '\n setting to: auto');
|
console.warn(color.red('`protocol: ipv4` option invalid'), '\n use:', ipOptions, '\n setting to:', DEFAULT_ENABLE_IPV4);
|
||||||
enableIPv4 = 'auto';
|
enableIPv4 = DEFAULT_ENABLE_IPV4;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enableIPv6 === false && enableIPv4 === false) {
|
if (enableIPv6 === false && enableIPv4 === false) {
|
||||||
|
Reference in New Issue
Block a user