Fixed tacnet error message thrown when received config is not the active config and would fail with wrong spec version instead of doing nothing.

This commit is contained in:
2021-02-09 20:44:02 -06:00
parent d340e94d46
commit 988ef506ce

View File

@@ -75,11 +75,9 @@ module TAC
if $window.backend.config&.name == config_name if $window.backend.config&.name == config_name
$window.backend.load_config(config_name) $window.backend.load_config(config_name)
else
$window.push_state(TAC::Dialog::AlertDialog, title: "Invalid Config", message: "Supported config spec: v#{TAC::CONFIG_SPEC_VERSION} got v#{data.dig(:config, :spec_version)}")
end end
else else
raise "Invalid Config!" $window.push_state(TAC::Dialog::AlertDialog, title: "Invalid Config", message: "Supported config spec: v#{TAC::CONFIG_SPEC_VERSION} got v#{data.dig(:config, :spec_version)}")
end end
rescue JSON::ParserError => e rescue JSON::ParserError => e