Fix Access behavior error in DeviceParser

Replace bracket notation (packet_data[key]) with Map.get/2 to avoid
UndefinedFunctionError when processing ParseError structs that don't
implement the Access behavior.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Graham McIntire 2025-07-15 11:10:50 -05:00
parent 114514bdfe
commit bf1c8a0b05
No known key found for this signature in database

View file

@ -23,8 +23,8 @@ defmodule Aprsme.DeviceParser do
end
defp get_field_value(packet_data, key) do
if Map.has_key?(packet_data, key) and not is_nil(packet_data[key]) do
packet_data[key]
if Map.has_key?(packet_data, key) do
Map.get(packet_data, key)
end
end