json encoding fix 2

This commit is contained in:
julian 2023-10-17 14:33:46 -06:00
parent 2562305d7c
commit 9d01f0beaa

View file

@ -958,10 +958,10 @@ class Prefs extends ChangeNotifier {
key: "fusionServerInfo", key: "fusionServerInfo",
) as String?; ) as String?;
if (saved == null) { try {
return FusionInfo.fromJsonString(saved!);
} catch (_) {
return FusionInfo.DEFAULTS; return FusionInfo.DEFAULTS;
} else {
return FusionInfo.fromJsonString(saved);
} }
} }
} }