Skip to content

Commit

Permalink
tiny fix
Browse files Browse the repository at this point in the history
  • Loading branch information
codekeyz committed Feb 26, 2025
1 parent 8cec0b9 commit ebdb232
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/globe_kv/lib/src/globe_kv_store.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@ sealed class KvValue<T> {
@internal
static KvValue<T> fromJson<T extends Object>(Map<String, dynamic> json) {
final value = json['value'];
final type = KvValueType.values
.firstWhereOrNull((t) => t.toString() == json['type']);

final type =
KvValueType.values.firstWhereOrNull((t) => t.name == json['type']);
if (type == null) {
throw ArgumentError(
'KV value type not found: Type:${json['type']} Value:$value',
Expand Down

0 comments on commit ebdb232

Please # to comment.