Skip to content

Commit a993641

Browse files
committed
Hotfix
1 parent 71edf30 commit a993641

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/either/serializer.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ const stringify = <T>(value: T): string => {
1818

1919
if (isEither(value)) {
2020
const variant = value.isRight ? 'Right' : 'Left'
21-
return wrap(variant, stringify(value.fold()))
21+
return wrap(
22+
variant,
23+
value.fold(() => '', stringify)
24+
)
2225
}
2326

2427
return JSON.stringify(value)

0 commit comments

Comments
 (0)