mirror of
https://github.com/ente-io/ente.git
synced 2025-08-08 07:28:26 +00:00
[mob][photos] Type check
This commit is contained in:
parent
044136ab0e
commit
bb6ad42084
@ -128,10 +128,12 @@ class PersonData {
|
||||
|
||||
// fromJson
|
||||
factory PersonData.fromJson(Map<String, dynamic> json) {
|
||||
final assigned = (json['assigned'] == null || json['assigned'].length == 0)
|
||||
final assigned = (json['assigned'] == null || json['assigned'].length == 0 || json['assigned'] != Iterable)
|
||||
? <ClusterInfo>[]
|
||||
: List<ClusterInfo>.from(
|
||||
json['assigned'].map((x) => ClusterInfo.fromJson(x)),
|
||||
json['assigned']
|
||||
.where((x) => x is Map<String, dynamic>)
|
||||
.map((x) => ClusterInfo.fromJson(x as Map<String, dynamic>)),
|
||||
);
|
||||
|
||||
final List<String> rejectedFaceIDs =
|
||||
|
Loading…
x
Reference in New Issue
Block a user