Skip to content

Commit

Permalink
Fixes attempt to get 'name' of undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
mtxr committed Jan 24, 2019
1 parent 03c3e65 commit 7224517
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/extension/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,8 @@ namespace SQLTools {
function autoConnectIfActive(currConn?: SerializedConnection) {
let defaultConnection = currConn || null;
if (!defaultConnection && ConfigManager.autoConnectTo) {
defaultConnection = {
name: ConfigManager.connections
.find((conn) => conn.name === ConfigManager.autoConnectTo).name,
} as SerializedConnection;
defaultConnection = ConfigManager.connections
.find((conn) => conn.name === ConfigManager.autoConnectTo) as SerializedConnection;
}
if (!defaultConnection) {
return setConnection();
Expand Down

0 comments on commit 7224517

Please sign in to comment.