From 988ef506ce219509352dfd33d41e9938a4704688 Mon Sep 17 00:00:00 2001 From: cyberarm Date: Tue, 9 Feb 2021 20:44:02 -0600 Subject: [PATCH] Fixed tacnet error message thrown when received config is not the active config and would fail with wrong spec version instead of doing nothing. --- lib/tacnet/packet_handler.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/tacnet/packet_handler.rb b/lib/tacnet/packet_handler.rb index 88e6c95..68fcc91 100644 --- a/lib/tacnet/packet_handler.rb +++ b/lib/tacnet/packet_handler.rb @@ -75,11 +75,9 @@ module TAC if $window.backend.config&.name == 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 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 rescue JSON::ParserError => e