mirror of
https://github.com/ente-io/ente.git
synced 2025-08-12 17:20:37 +00:00
[mob][photos] Type check
This commit is contained in:
@@ -128,10 +128,12 @@ class PersonData {
|
|||||||
|
|
||||||
// fromJson
|
// fromJson
|
||||||
factory PersonData.fromJson(Map<String, dynamic> json) {
|
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>[]
|
? <ClusterInfo>[]
|
||||||
: List<ClusterInfo>.from(
|
: 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 =
|
final List<String> rejectedFaceIDs =
|
||||||
|
Reference in New Issue
Block a user