From 9d01f0beaa9b817aecd095fdda5292893e1e9078 Mon Sep 17 00:00:00 2001 From: julian Date: Tue, 17 Oct 2023 14:33:46 -0600 Subject: [PATCH] json encoding fix 2 --- lib/utilities/prefs.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/utilities/prefs.dart b/lib/utilities/prefs.dart index 4dcd9a65d..6fe9689ab 100644 --- a/lib/utilities/prefs.dart +++ b/lib/utilities/prefs.dart @@ -958,10 +958,10 @@ class Prefs extends ChangeNotifier { key: "fusionServerInfo", ) as String?; - if (saved == null) { + try { + return FusionInfo.fromJsonString(saved!); + } catch (_) { return FusionInfo.DEFAULTS; - } else { - return FusionInfo.fromJsonString(saved); } } }