Skip to content

Commit 98e5df6

Browse files
committed
fix for njs
1 parent 0e89027 commit 98e5df6

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/helpers/parseUtil.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,11 @@ export class ParseStatus {
112112
): Promise<SyncParseReturnType<any>> {
113113
const syncPairs: ObjectPair[] = [];
114114
for (const pair of pairs) {
115+
const key = await pair.key;
116+
const value = await pair.value;
115117
syncPairs.push({
116-
key: await pair.key,
117-
value: await pair.value,
118+
key,
119+
value,
118120
});
119121
}
120122
return ParseStatus.mergeObjectSync(status, syncPairs);

src/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2349,9 +2349,10 @@ export class ZodObject<
23492349
const syncPairs: any[] = [];
23502350
for (const pair of pairs) {
23512351
const key = await pair.key;
2352+
const value = await pair.value;
23522353
syncPairs.push({
23532354
key,
2354-
value: await pair.value,
2355+
value,
23552356
alwaysSet: pair.alwaysSet,
23562357
});
23572358
}

0 commit comments

Comments
 (0)