Skip to content

Commit 44d5289

Browse files
authored
fix: add fallback for isSecret key (hoppscotch#5157)
1 parent 9eeac1a commit 44d5289

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

packages/hoppscotch-common/src/components/environments/my/Details.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ const saveEnvironment = () => {
460460
key: e.key,
461461
currentValue: e.currentValue,
462462
varIndex: i,
463-
isSecret: e.secret,
463+
isSecret: e.secret ?? false,
464464
})
465465
: O.none
466466
)

packages/hoppscotch-common/src/components/environments/teams/Details.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ const saveEnvironment = async () => {
426426
key: e.key,
427427
currentValue: e.currentValue,
428428
varIndex: i,
429-
isSecret: e.secret,
429+
isSecret: e.secret ?? false,
430430
})
431431
: O.none
432432
)

packages/hoppscotch-common/src/helpers/RequestRunner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ const updateEnvironments = (
164164

165165
nonSecretVariables.push({
166166
key: e.key,
167-
isSecret: e.secret,
167+
isSecret: e.secret ?? false,
168168
varIndex: index,
169169
currentValue: e.currentValue ?? "",
170170
})

packages/hoppscotch-common/src/services/persistence/validation-schemas/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ export const CURRENT_ENVIRONMENT_VALUE_SCHEMA = z.union([
386386
key: z.string(),
387387
currentValue: z.string(),
388388
varIndex: z.number(),
389-
isSecret: z.boolean(),
389+
isSecret: z.boolean().catch(false),
390390
})
391391
.strict()
392392
)

0 commit comments

Comments
 (0)