Fixes behavior anomaly alert key not found

This commit is contained in:
MatteoBiscosi 2021-06-23 22:55:08 +02:00
parent fd40e51428
commit 47497ca666
5 changed files with 45 additions and 37 deletions

View file

@ -475,7 +475,7 @@ function alert_consts.getAlertType(alert_key, alert_entity_id)
alert_key = tonumber(alert_key)
alert_entity_id = tonumber(alert_entity_id)
if alert_entity_id and alerts_by_id[alert_entity_id] then
if alert_entity_id and alerts_by_id[alert_entity_id] and alerts_by_id[alert_entity_id][alert_key] then
return alerts_by_id[alert_entity_id][alert_key]
end