Skip to content

Commit 39cd706

Browse files
committed
fix
1 parent db55621 commit 39cd706

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/FsCodec.SystemTextJson/UnionOrTypeSafeEnumConverterFactory.fs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ type UnionOrTypeSafeEnumConverterFactory(typeSafeEnum, union) =
1212
static let hasConverterAttribute = memoize (fun (t: Type) -> t.IsDefined(typeof<JsonConverterAttribute>, true))
1313

1414
override _.CanConvert(t: Type) =
15-
t.IsGenericType
16-
&& not (let gtd = t.GetGenericTypeDefinition() in gtd = typedefof<option<_>> || gtd = typedefof<list<_>>)
15+
not (t.IsGenericType && let gtd = t.GetGenericTypeDefinition() in gtd = typedefof<option<_>> || gtd = typedefof<list<_>>)
1716
&& FsCodec.Union.isUnion t
1817
&& not (hasConverterAttribute t)
1918
&& ((typeSafeEnum && union)

0 commit comments

Comments
 (0)