Skip to content

Commit 8e9115a

Browse files
committed
Add inline docs
1 parent 0a86864 commit 8e9115a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/JSInterop/Microsoft.JSInterop/src/Infrastructure/TaskGenericsUtil.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public void SetResult(object tcs, object? result)
8989
// If necessary, attempt a cast
9090
var typedResult = result is T resultT
9191
? resultT
92-
: result == null && default(T) == null
92+
: result == null && default(T) == null // ChangeType can't convert null to value types
9393
? default(T)
9494
: (T)Convert.ChangeType(result, typeof(T), CultureInfo.InvariantCulture)!;
9595

0 commit comments

Comments
 (0)