Skip to content

Commit 5c0c569

Browse files
committed
Use Object instead of Map for LocalValue.FromNode
1 parent 86f9171 commit 5c0c569

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dotnet/src/webdriver/BiDi/Modules/Script/LocalValue.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ public static LocalValue FromNode(JsonNode? node)
117117
return new Array(node.AsArray().Select(FromNode));
118118

119119
case JsonValueKind.Object:
120-
return new Map(node.AsObject().ToDictionary(m => m.Key, m => FromNode(m.Value)));
120+
Dictionary<string, LocalValue> values = node.AsObject().ToDictionary(node => node.Key, node => FromNode(node.Value));
121+
return Object.FromDictionary(values);
121122

122123
default:
123124
throw new InvalidCastException($"Could not convert node {node}");

0 commit comments

Comments
 (0)