fix: coerce existing aggregate analytics database entries into correct format before merging to avoid data loss (#5136)
This commit is contained in:
parent
c4adac38f0
commit
1d27ca429a
1 changed files with 2 additions and 2 deletions
|
|
@ -383,8 +383,8 @@ class AnalyticsDatabase with DatabaseFileStorage {
|
|||
|
||||
ConstructUses model;
|
||||
|
||||
if (raw is Map<String, dynamic>) {
|
||||
model = ConstructUses.fromJson(raw);
|
||||
if (raw != null) {
|
||||
model = ConstructUses.fromJson(Map<String, dynamic>.from(raw));
|
||||
} else {
|
||||
final u = usesForKey.first;
|
||||
model = ConstructUses(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue