mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-30 20:56:53 +00:00
Fix null check on DNS check
This commit is contained in:
parent
3fbdc05469
commit
3c3cb376e2
|
@ -159,7 +159,7 @@ class ServerInstallationCubit extends Cubit<ServerInstallationState> {
|
||||||
final Map<String, bool> matches = await repository.isDnsAddressesMatch(
|
final Map<String, bool> matches = await repository.isDnsAddressesMatch(
|
||||||
domainName,
|
domainName,
|
||||||
ip4,
|
ip4,
|
||||||
dataState.dnsMatches,
|
dataState.dnsMatches ?? {},
|
||||||
);
|
);
|
||||||
|
|
||||||
if (matches.values.every((final bool value) => value)) {
|
if (matches.values.every((final bool value) => value)) {
|
||||||
|
|
|
@ -153,7 +153,7 @@ class ServerInstallationRepository {
|
||||||
Future<Map<String, bool>> isDnsAddressesMatch(
|
Future<Map<String, bool>> isDnsAddressesMatch(
|
||||||
final String? domainName,
|
final String? domainName,
|
||||||
final String? ip4,
|
final String? ip4,
|
||||||
final Map<String, bool>? skippedMatches,
|
final Map<String, bool> skippedMatches,
|
||||||
) async {
|
) async {
|
||||||
final List<String> addresses = <String>[
|
final List<String> addresses = <String>[
|
||||||
'$domainName',
|
'$domainName',
|
||||||
|
@ -166,7 +166,7 @@ class ServerInstallationRepository {
|
||||||
final Map<String, bool> matches = <String, bool>{};
|
final Map<String, bool> matches = <String, bool>{};
|
||||||
|
|
||||||
for (final String address in addresses) {
|
for (final String address in addresses) {
|
||||||
if (skippedMatches![address] ?? false) {
|
if (skippedMatches[address] ?? false) {
|
||||||
matches[address] = true;
|
matches[address] = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue