mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-12-23 10:11:52 +03:00
Don't update OATH credentials list when null
This commit is contained in:
parent
a4d4fa538d
commit
d6d01ba227
@ -295,7 +295,7 @@ class DesktopCredentialListNotifier extends OathCredentialListNotifier {
|
||||
code = OathCode.fromJson(result);
|
||||
}
|
||||
_log.debug('Calculate', jsonEncode(code));
|
||||
if (update && mounted) {
|
||||
if (update && mounted && state != null) {
|
||||
final creds = state!.toList();
|
||||
final i = creds.indexWhere((e) => e.credential.id == credential.id);
|
||||
state = creds..[i] = creds[i].copyWith(code: code);
|
||||
|
Loading…
Reference in New Issue
Block a user