Skip to content

Commit 1f466d9

Browse files
jandockxjandppwcolinhacks
authored
describe how one can protect from cyclical objects starting an infini… (#3447)
* describe how one can protect from cyclical objects starting an infinite loop * correct erroneous file deletions * Update readme --------- Co-authored-by: Jan Dockx <Jan_Dockx@peopleware.be> Co-authored-by: Colin McDonnell <colinmcd94@gmail.com>
1 parent 6e5699a commit 1f466d9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1957,7 +1957,9 @@ Thanks to [ggoodman](https://github.com/ggoodman) for suggesting this.
19571957

19581958
### Cyclical objects
19591959

1960-
Despite supporting recursive schemas, passing cyclical data into Zod will cause an infinite loop.
1960+
Despite supporting recursive schemas, passing cyclical data into Zod will cause an infinite loop in some cases.
1961+
1962+
> To detect cyclical objects before they cause problems, consider [this approach](https://gist.github.com/colinhacks/d35825e505e635df27cc950776c5500b).
19611963
19621964
## Promises
19631965

deno/lib/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1957,7 +1957,9 @@ Thanks to [ggoodman](https://github.com/ggoodman) for suggesting this.
19571957

19581958
### Cyclical objects
19591959

1960-
Despite supporting recursive schemas, passing cyclical data into Zod will cause an infinite loop.
1960+
Despite supporting recursive schemas, passing cyclical data into Zod will cause an infinite loop in some cases.
1961+
1962+
> To detect cyclical objects before they cause problems, consider [this approach](https://gist.github.com/colinhacks/d35825e505e635df27cc950776c5500b).
19611963
19621964
## Promises
19631965

0 commit comments

Comments
 (0)