Skip to content

Commit

Permalink
Add hard check for button before accessing properties
Browse files Browse the repository at this point in the history
Signed-off-by: worksofliam <[email protected]>
  • Loading branch information
worksofliam committed Jul 17, 2024
1 parent 44d9b00 commit e9fdd9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/webviews/login/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ async function promptPassword(context: vscode.ExtensionContext, connection: Conn
}];

const onClose = (button?: vscode.QuickInputButton | void) => {
if (button?.tooltip === savePasswordLabel) {
if (button && button.tooltip === savePasswordLabel) {
savePassword = true;
}
connection.password = passwordBox.value;
Expand Down

0 comments on commit e9fdd9d

Please sign in to comment.