fix: coerce existing aggregate analytics database entries into correct format before merging to avoid data loss (#5136)

This commit is contained in:
ggurdin 2026-01-08 14:56:20 -05:00 committed by GitHub
parent c4adac38f0
commit 1d27ca429a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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(