From a6c471b2e4ee8078ade2370e485a15896a507ea7 Mon Sep 17 00:00:00 2001 From: Livio Spring Date: Tue, 21 Mar 2023 11:19:49 +0100 Subject: [PATCH] fix: possible nil pointer in actions (#5510) --- internal/actions/object/user_grant.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/actions/object/user_grant.go b/internal/actions/object/user_grant.go index 5eb565f986..204a4d8342 100644 --- a/internal/actions/object/user_grant.go +++ b/internal/actions/object/user_grant.go @@ -59,6 +59,9 @@ func AppendGrantFunc(userGrants *UserGrants) func(c *actions.FieldConfig) func(c } func UserGrantsFromQuery(c *actions.FieldConfig, userGrants *query.UserGrants) goja.Value { + if userGrants == nil { + return c.Runtime.ToValue(nil) + } grantList := &userGrantList{ Count: userGrants.Count, Sequence: userGrants.Sequence,