]> git.proxmox.com Git - flutter/proxmox_dart_api_client.git/commitdiff
tfa: drop unreachable null-fallback for has-recovery check
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 3 Apr 2024 09:23:13 +0000 (11:23 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 3 Apr 2024 09:23:15 +0000 (11:23 +0200)
any already returns false if there wasn't any value foudn meeting the
check.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
lib/src/tfa_challenge.dart

index a01c43a4795583d21503a2a604a8567ffbf00a45..399efd7abd7f1428f9d89cb8cf0e3a748f29ba2f 100644 (file)
@@ -38,7 +38,7 @@ class TfaChallenge {
   }
 
   bool hasRecovery() {
-    return recovery?.any((e) => e != null) ?? false;
+    return recovery.any((e) => e != null);
   }
 
   Iterable<String> kinds() sync* {