From d419374ee1170c62d0b3d5ac4a59325aea1c81e3 Mon Sep 17 00:00:00 2001 From: Vilsol Date: Sat, 12 Oct 2024 17:03:35 +0300 Subject: [PATCH] fix: handle deleted mod dependencies in REST API --- nodes/mod.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nodes/mod.go b/nodes/mod.go index f920612..233f41b 100644 --- a/nodes/mod.go +++ b/nodes/mod.go @@ -501,7 +501,9 @@ func getAllModVersions(c echo.Context) (interface{}, *ErrorResponse) { for _, version := range versions { for _, dependency := range version.Edges.VersionDependencies { - dependency.ModID = dependency.Edges.Mod.ModReference + if dependency.Edges.Mod != nil { + dependency.ModID = dependency.Edges.Mod.ModReference + } } }