Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

fix: add previous value as optional in test schema env diff (#4071)

Nivedind0350ec789c8
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()),
})
)
),