From bf1c8a0b05c1b3bde470df799e3c9c649780ac05 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Tue, 15 Jul 2025 11:10:50 -0500 Subject: [PATCH] Fix Access behavior error in DeviceParser MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- lib/aprsme/device_parser.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/aprsme/device_parser.ex b/lib/aprsme/device_parser.ex index a703c28..b2b331e 100644 --- a/lib/aprsme/device_parser.ex +++ b/lib/aprsme/device_parser.ex @@ -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