Skip to content

Commit

Permalink
Fix empty config.json file loading
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean28518 committed Apr 14, 2024
1 parent ff1d204 commit e69e45a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/services/config_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ class ConfigHandler {
configMap["config_initialized"] = true;
} else {
String configString = await configFile.readAsString();
if (configString.trim() == "") {
configMap["config_initialized"] = true;
return;
}
configMap = jsonDecode(configString);
configMap["config_initialized"] = true;
}
Expand Down

0 comments on commit e69e45a

Please sign in to comment.