Skip to content

Commit 251cfcc

Browse files
Andrii Chebukinxperiandri
authored andcommitted
Fixed wrong condition on checking if dictionary is mutable
1 parent d80b77c commit 251cfcc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/FSharp.Data.GraphQL.Shared/Errors.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ type GQLProblemDetails = {
112112
static member SetErrorKind (errorKind : ErrorKind) (extensions : IReadOnlyDictionary<string, obj>) =
113113
let mutableExtensions =
114114
match extensions with
115-
| :? IDictionary<string, obj> as extensions -> extensions
115+
| :? IDictionary<string, obj> as extensions when not extensions.IsReadOnly -> extensions
116116
| _ ->
117117
#if NETSTANDARD2_0
118118
let dictionary = Dictionary<string, obj> (extensions.Count)

0 commit comments

Comments
 (0)