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:
parent
114514bdfe
commit
bf1c8a0b05
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue