Skip to content

Commit

Permalink
[fix] Fixed nil dhcp_leases case
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier committed Oct 6, 2020
1 parent 8aef08c commit fa69556
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion netjson-monitoring.lua
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ netjson = {
}

dhcp_leases = get_dhcp_leases()
if next(dhcp_leases) then
if dhcp_leases and next(dhcp_leases) then
netjson.dhcp_leases = dhcp_leases
end

Expand Down

0 comments on commit fa69556

Please sign in to comment.