Ensure valid config

This commit is contained in:
luboslenco
2025-10-16 19:25:04 +02:00
parent 13de6d2619
commit 46c2850260
+5 -2
View File
@@ -21,8 +21,11 @@ function config_load() {
/// end
if (blob != null) {
config_loaded = true;
config_raw = json_parse(sys_buffer_to_string(blob));
let config_string: string = sys_buffer_to_string(blob);
if (starts_with(config_string, "{\"version\":")) { // Ensure valid config
config_loaded = true;
config_raw = json_parse(config_string);
}
}
}