From 98e5df69cf435bbeab74a54098dcdffa13da92a9 Mon Sep 17 00:00:00 2001 From: Vladimir Dronnikov Date: Sat, 16 Dec 2023 18:24:40 +0000 Subject: [PATCH] fix for njs --- src/helpers/parseUtil.ts | 6 ++++-- src/types.ts | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/helpers/parseUtil.ts b/src/helpers/parseUtil.ts index 3a278b999..9665fe836 100644 --- a/src/helpers/parseUtil.ts +++ b/src/helpers/parseUtil.ts @@ -112,9 +112,11 @@ export class ParseStatus { ): Promise> { const syncPairs: ObjectPair[] = []; for (const pair of pairs) { + const key = await pair.key; + const value = await pair.value; syncPairs.push({ - key: await pair.key, - value: await pair.value, + key, + value, }); } return ParseStatus.mergeObjectSync(status, syncPairs); diff --git a/src/types.ts b/src/types.ts index 567936b76..c9daed9b7 100644 --- a/src/types.ts +++ b/src/types.ts @@ -2349,9 +2349,10 @@ export class ZodObject< const syncPairs: any[] = []; for (const pair of pairs) { const key = await pair.key; + const value = await pair.value; syncPairs.push({ key, - value: await pair.value, + value, alwaysSet: pair.alwaysSet, }); }