Skip to content

Commit

Permalink
describe how one can protect from cyclical objects starting an infini… (
Browse files Browse the repository at this point in the history
#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>
  • Loading branch information
3 people committed Apr 30, 2024
1 parent 6e5699a commit 1f466d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1957,7 +1957,9 @@ Thanks to [ggoodman](https://github.com/ggoodman) for suggesting this.

### Cyclical objects

Despite supporting recursive schemas, passing cyclical data into Zod will cause an infinite loop.
Despite supporting recursive schemas, passing cyclical data into Zod will cause an infinite loop in some cases.

> To detect cyclical objects before they cause problems, consider [this approach](https://gist.github.com/colinhacks/d35825e505e635df27cc950776c5500b).
## Promises

Expand Down
4 changes: 3 additions & 1 deletion deno/lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1957,7 +1957,9 @@ Thanks to [ggoodman](https://github.com/ggoodman) for suggesting this.

### Cyclical objects

Despite supporting recursive schemas, passing cyclical data into Zod will cause an infinite loop.
Despite supporting recursive schemas, passing cyclical data into Zod will cause an infinite loop in some cases.

> To detect cyclical objects before they cause problems, consider [this approach](https://gist.github.com/colinhacks/d35825e505e635df27cc950776c5500b).
## Promises

Expand Down

0 comments on commit 1f466d9

Please sign in to comment.