Fix null check on DNS check

pull/90/head
Inex Code 2022-06-09 19:15:53 +03:00
parent 3fbdc05469
commit 3c3cb376e2
2 changed files with 3 additions and 3 deletions

View File

@ -159,7 +159,7 @@ class ServerInstallationCubit extends Cubit<ServerInstallationState> {
final Map<String, bool> matches = await repository.isDnsAddressesMatch(
domainName,
ip4,
dataState.dnsMatches,
dataState.dnsMatches ?? {},
);
if (matches.values.every((final bool value) => value)) {

View File

@ -153,7 +153,7 @@ class ServerInstallationRepository {
Future<Map<String, bool>> isDnsAddressesMatch(
final String? domainName,
final String? ip4,
final Map<String, bool>? skippedMatches,
final Map<String, bool> skippedMatches,
) async {
final List<String> addresses = <String>[
'$domainName',
@ -166,7 +166,7 @@ class ServerInstallationRepository {
final Map<String, bool> matches = <String, bool>{};
for (final String address in addresses) {
if (skippedMatches![address] ?? false) {
if (skippedMatches[address] ?? false) {
matches[address] = true;
continue;
}