Skip to content

Commit

Permalink
Merge pull request #1975 from klezVirus/master
Browse files Browse the repository at this point in the history
Fix country_code is null
  • Loading branch information
jcrew99 authored Aug 3, 2020
2 parents 36bd907 + 3a0178b commit 8876f69
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ try{
balloon_text += "Hardware: " + hooked_browser.hw_name;
balloon_text += "<br/>";

if (hooked_browser.country == 'Unknown') {
if ( !hooked_browser.country || !hooked_browser.country_code || hooked_browser.country == 'Unknown' ) {
balloon_text += " <img width='13px' height='13px' class='zombie-tree-icon' src='<%= @base_path %>/media/images/icons/unknown.png' /> ";
balloon_text += "Location: Unknown";
} else {
Expand All @@ -506,7 +506,7 @@ try{
text += "<img width='13px' height='13px' class='zombie-tree-icon' src='<%= @base_path %>/media/images/icons/" + escape(os_icon) + "' /> ";
text += "<img width='13px' height='13px' class='zombie-tree-icon' src='<%= @base_path %>/media/images/icons/" + escape(hw_icon) + "' /> ";

if (hooked_browser.country == 'Unknown') {
if ( !hooked_browser.country || !hooked_browser.country_code || hooked_browser.country == 'Unknown' ) {
text += "<img width='13px' height='13px' class='zombie-tree-icon' src='<%= @base_path %>/media/images/icons/unknown.png' /> ";
} else {
text += "<img width='13px' height='13px' class='zombie-tree-icon' src='<%= @base_path %>/media/images/icons/country-squared/" + escape(hooked_browser.country_code.toLowerCase()) + ".svg' /> ";
Expand Down

0 comments on commit 8876f69

Please sign in to comment.