Handle possibly nil tables

This commit is contained in:
emanuele-f 2019-07-12 12:51:53 +02:00
parent 2459794216
commit 8a8157a015
3 changed files with 3 additions and 3 deletions

View file

@ -35,7 +35,7 @@ function checkNetworkAlerts(granularity)
return
end
local network_config = config_alerts[network_key]
local network_config = config_alerts[network_key] or {}
local global_config = config_alerts["local_networks"] or {}
local has_configured_alerts = (table.len(network_config or global_config) > 0)