Skip to content

Commit

Permalink
Added code that if the password checkbox is checked and the variable …
Browse files Browse the repository at this point in the history
…name field is empty it will populate with 'PASSWORD'
  • Loading branch information
tkmcmaster committed Aug 29, 2024
1 parent 94fe534 commit 0d186ab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions controller/components/StartTestForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,10 @@ export const StartTestForm = ({
foundVar.variableName = newEnvVar.variableName !== undefined ? newEnvVar.variableName : foundVar.variableName;
foundVar.variableValue = newEnvVar.variableValue !== undefined ? newEnvVar.variableValue : foundVar.variableValue;
foundVar.type = newEnvVar.type !== undefined ? newEnvVar.type : foundVar.type;
if (newEnvVar.type === "password" && foundVar.variableName === "") {
// If we check the "password" box and the name is blank, default the name to PASSWORD
foundVar.variableName = "PASSWORD";
}
} else {
// New var
const newVar: EnvironmentVariablesState = {
Expand Down

0 comments on commit 0d186ab

Please sign in to comment.