diff --git a/paint/sources/config.ts b/paint/sources/config.ts index da9cd0df..0857ceba 100644 --- a/paint/sources/config.ts +++ b/paint/sources/config.ts @@ -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); + } } }