This is an automated email from the ASF dual-hosted git repository.

xiazcy pushed a commit to branch dotnet-http
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 3e4408eb2b6c122bc503ea8e1f4686a347024cd4
Author: Ken Hu <[email protected]>
AuthorDate: Tue Jan 27 13:17:52 2026 -0800

    Fix dotnet bug in getting merge Ids from map
---
 gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs 
b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
index bb61d0078c..2ef46e8991 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
@@ -1459,10 +1459,10 @@ namespace Gremlin.Net.Process.Traversal
         /// </summary>
         public GraphTraversal<TStart, Edge> MergeE 
(IDictionary<object,object?>? m)
         {
-            if (m != null && m[Direction.Out] is Vertex outV) {
+            if (m != null && m.TryGetValue(Direction.Out, out var outValue) && 
outValue is Vertex outV) {
                 m[Direction.Out] = outV.Id;
             }
-            if (m != null && m[Direction.In] is Vertex inV) {
+            if (m != null && m.TryGetValue(Direction.In, out var inValue) && 
inValue is Vertex inV) {
                 m[Direction.In] = inV.Id;
             }
             GremlinLang.AddStep("mergeE", m);

Reply via email to