From d0350ec789c8a84b6571f6f5eac87be2c495bbc0 Mon Sep 17 00:00:00 2001 From: Nivedin <53208152+nivedin@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:29:48 +0530 Subject: [PATCH] fix: add previous value as optional in test schema env diff (#4071) * fix: add previous value as optional * refactor: remove method chaining for consistency --------- Co-authored-by: jamesgeorge007 --- .../src/services/persistence/validation-schemas/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/hoppscotch-common/src/services/persistence/validation-schemas/index.ts b/packages/hoppscotch-common/src/services/persistence/validation-schemas/index.ts index 5efdf7655..36dc51620 100644 --- a/packages/hoppscotch-common/src/services/persistence/validation-schemas/index.ts +++ b/packages/hoppscotch-common/src/services/persistence/validation-schemas/index.ts @@ -400,7 +400,7 @@ const HoppTestResultSchema = z (x) => "secret" in x && !x.secret ).and( z.object({ - previousValue: z.string(), + previousValue: z.optional(z.string()), }) ) ), @@ -415,7 +415,7 @@ const HoppTestResultSchema = z (x) => "secret" in x && !x.secret ).and( z.object({ - previousValue: z.string(), + previousValue: z.optional(z.string()), }) ) ),