Skip to content

Commit eb4341f

Browse files
committed
fix nullability for as casts
1 parent 6325827 commit eb4341f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dotnet/src/webdriver/Response.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public static Response FromJson(string value)
112112
}
113113
}
114114

115-
if (contents is Dictionary<string, object> valueDictionary)
115+
if (contents is Dictionary<string, object?> valueDictionary)
116116
{
117117
// Special case code for the new session command. If the response contains
118118
// sessionId and capabilities properties, fix up the session ID and value members.
@@ -167,7 +167,7 @@ public static Response FromErrorJson(string value)
167167
throw new WebDriverException($"The 'value' property was not found in the response:{Environment.NewLine}{value}");
168168
}
169169

170-
if (valueObject is not Dictionary<string, object> valueDictionary)
170+
if (valueObject is not Dictionary<string, object?> valueDictionary)
171171
{
172172
throw new WebDriverException($"The 'value' property is not a dictionary of <string, object>{Environment.NewLine}{value}");
173173
}

0 commit comments

Comments
 (0)