Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
npm install && npm run build
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed Jun 1, 2024
1 parent 742f70c commit 6c2e800
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26340,10 +26340,13 @@ var ZodPipeline = class _ZodPipeline extends ZodType {
var ZodReadonly = class extends ZodType {
_parse(input) {
const result = this._def.innerType._parse(input);
if (isValid(result)) {
result.value = Object.freeze(result.value);
}
return result;
const freeze = (data) => {
if (isValid(data)) {
data.value = Object.freeze(data.value);
}
return data;
};
return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result);
}
unwrap() {
return this._def.innerType;
Expand Down

0 comments on commit 6c2e800

Please sign in to comment.