From 6c2e800ab2e9487db27fc32e80c4495022560825 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Sun, 2 Jun 2024 00:21:05 +0900 Subject: [PATCH] `npm install && npm run build` --- dist/index.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index 84f9748..e4e6ce8 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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;